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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -