Using latest rc1, there's an error if a script_score
script references _index
(for text scoring):
illegal_argument_exception - Variable [_index] is not defined
Sample query:
GET _search
{
"query": {
"function_score": {
"query": {
"match": { "title": "apple" }
},
"functions": [
{
"script_score": {
"script": {
"lang": "painless",
"inline": "_index['title'].docCount()"
}
}
}
]
}
}
}
Anyone know why there's an error?