aggregation - ElasticSearch and Agregation -



aggregation - ElasticSearch and Agregation -

i have been given problem need perform search based on different fields.for example,on ui user giving several search alternative company name,department,state/province,title country , region.

the user selects few of these options company name,department,state.i need perform search on these fields , homecoming results.

can help of aggregation in elastic search?can give me detailed illustration on how can done.

i did few illustration performing aggregation on gender.the query follows:- "aggs" :{"group_by_gender" :{"terms" :{"field" : "gender"}}

when ran type of query sources(from documents) returned.so,i kind of confused whether aggregation performed.

thanks in advance

aggregations meant create statistics on values of fields. if need search documents depending on fields, need create (boolean) queries.

example:

post myindex/_search { "bool" : { "must" : [ {"term" : { "name" : "kimchy" }}, {"term" : { "state" : "unicorn planet" }} ] } }

elasticsearch aggregation

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -