elasticsearch - How to do script calculation on Facet value? -
i want implement script in app using elasticsearch 0.19. find term facet applied script on "field term". possible apply script on "field value"?
i find examples applying script on "field term" below:
{ "query" : { "match_all" : { } }, "facets" : { "tag" : { "terms" : { "field" : "tag", "size" : 10, "script" : "term + 'aaa'" } } } } thanks in advance! manoj
an optimal way achieve this, index field the second time not_analyzed fields, , use "untouched" version in facet. way terms equal field values. alternatively, if index not large , field stored, can try using script_field.
Comments
Post a Comment