\"sqrt\" is not defined. (Script3.js#1)
一些sqrt,log等函数无法使用,script脚本已经安装了
POST /appstoreservicetest/app/_search
{
"query": {
"function_score":{
"query":{
"bool": {
"should": [
{
"match": {
"appName": "a"
}
},
{
"match": {
"appName": "滴滴出行"
}
}
],
"minimum_should_match":1
}
},
"script_score": {
"script": {
"lang":"javascript",
"inline":"sqrt(log10(1000000/10000 +10)) * sqrt(100) * sqrt((10 + 1))"
}
}
}
}
}
{
"error": {
"root_cause": [
{
"type": "ecma_error",
"reason": "ReferenceError: \"log10\" is not defined. (Script6.js#1)"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "appstoreservicetest",
"node": "rv6eXcVJSqyO-jXlv85niw",
"reason": {
"type": "ecma_error",
"reason": "ReferenceError: \"log10\" is not defined. (Script6.js#1)"
}
}
],
"caused_by": {
"type": "ecma_error",
"reason": "ReferenceError: \"log10\" is not defined. (Script6.js#1)"
}
},
"status": 500
}
一些sqrt,log等函数无法使用,script脚本已经安装了
POST /appstoreservicetest/app/_search
{
"query": {
"function_score":{
"query":{
"bool": {
"should": [
{
"match": {
"appName": "a"
}
},
{
"match": {
"appName": "滴滴出行"
}
}
],
"minimum_should_match":1
}
},
"script_score": {
"script": {
"lang":"javascript",
"inline":"sqrt(log10(1000000/10000 +10)) * sqrt(100) * sqrt((10 + 1))"
}
}
}
}
}
{
"error": {
"root_cause": [
{
"type": "ecma_error",
"reason": "ReferenceError: \"log10\" is not defined. (Script6.js#1)"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "appstoreservicetest",
"node": "rv6eXcVJSqyO-jXlv85niw",
"reason": {
"type": "ecma_error",
"reason": "ReferenceError: \"log10\" is not defined. (Script6.js#1)"
}
}
],
"caused_by": {
"type": "ecma_error",
"reason": "ReferenceError: \"log10\" is not defined. (Script6.js#1)"
}
},
"status": 500
}
1 个回复
shiyuan
赞同来自: krugle