match_query inside script? [elasticsearch] -


i have quite complex aggregation, complexity caused absence of has_parent aggregation. since it's implemented using groovy. problem have filter docs being counted in aggregation.

aggregation looks this: https://gist.github.com/serj-p/c4fcc9810b3b627de294 aim of aggregation build top of universities contacts graduated from. contact doc has child docs, facebook profiles. last ones have nested fields representing universities, that's why access _source field.

as can see, perform filtering in beginning :

                      {                         "match_phrase_prefix": {                           "organizations.name": "stan"                         }                       } 

to exclude contacts not having relevant docs. "organizations.name" analyzed as

           {                 "filter": [                     "lowercase",                     "standard",                     "trim",                     "asciifolding",                 ],                 "type": "custom",                 "tokenizer": "standard"             } 

the text being appleid filter field being analyzed in same way. found difficult same processing of field value , filtering text inside of script should filter particular nested docs. that's why looking possibility access es api script so.

thanks in advance advice


Comments

Popular posts from this blog

ios - UITEXTFIELD InputView Uipicker not working in swift -

Hatching array of circles in AutoCAD using c# -

Python Pig Latin Translator -