Native facet script

Hi,

is it possible to use native script in facets?

For example, when i run:

{
"facets": {
"judges": {
"terms": {
"field": "judges.untouched",
"size": 10,
"all_terms": false,
"global_facets": true,
"_script": {
"script": "facet_matcher",
"params": {
"a": "b"
},
"lang": "native"
}
}
}
}

it correctly use native facet provided in elasticsearch.yml

But when i fetch more facets, elasticsearch fail to parse the query:

{
"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
}
}
}

with error:
... Parse Failure [No parser for element [judges_selected]]]; }]

What am i doing wrong? Is is possible to use facet script like this?

Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.