是否可以在构面中使用本机脚本?
例如,当我运行时:
{
"facets": {
"judges": {
"terms": {
"field": "judges.untouched",
"size": 10,
"all_terms": false,
"global_facets": true,
"_script": {
"script": "facet_matcher",
"params": {
"a": "b"
},
"lang": "native"
}
}
}
}
它正确使用 elasticsearch.yml 中提供的本机方面
但是当我获取更多方面时,elasticsearch 无法解析查询:
{
"facets": {
"judges": {
"terms": {
"field": "judges.untouched",
"size": 10,
"all_terms": false,
"global_facets": true,
"_script": {
"script": "facet_matcher",
"params": {
"a": "b"
},
"lang": "native"
}
}
},
"judges_selected": {
"terms": {
"field": "judges.untouched",
"size": 10,
"all_terms": false
},
"global_facets": false
}
}
}
有错误:
... Parse Failure [No parser for element [judges_selected]]]; }]
我究竟做错了什么?是否可以使用这样的构面脚本?
谢谢