0

We are trying to get the frequency count for search terms using aggregation. Since there are three keys for which we need to get the frequency count facing performance degrade with respect to search. How to get frequency count without aggregation? Please suggest some alternate approach.

Query:

{ "aggs": { "name_exct": { "filter": { "term": { "name_exct": "test" } }, "aggs": { "name_exct_count": { "terms": { "field": "name_exct" } } } }, "CITY": { "filter": { "term": { "CITY": "US" }, "aggs": { "CITY_count": { "terms": { "field": "CITY" } } } } } }

Eilon
  • 25,582
  • 3
  • 84
  • 102
banu
  • 31
  • 1
  • 1
  • 6
  • Please show the aggregation query that gives you trouble and the result you expect. – Val Jan 04 '17 at 05:56
  • You can also try the [field stats API](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/search-field-stats.html) – Val Jan 04 '17 at 05:58
  • Please put that in your question and format it properly so people can read it – Val Jan 04 '17 at 06:10
  • @Val Updated the post please provide your suggestion on this . – banu Jan 04 '17 at 06:33
  • Field stats API is experimental and it will be removed from future release can we use this ? or any other approach available ? – banu Jan 04 '17 at 06:34
  • I'm not certain that your aggregation query above is syntactically correct. Are you sure you copy/pasted it correctly? – Val Jan 04 '17 at 06:37
  • experimental APIs **will not** be removed, but they **may** be removed (wording is important). – Val Jan 04 '17 at 06:38
  • @Val please find the aggregation edited. This is the one which we are using. – banu Jan 04 '17 at 06:45
  • It's the same as before and if you execute that you'll see an error `Could not find aggregator type [zipfreqCount] in [aggs]`. Something is missing... – Val Jan 04 '17 at 06:50
  • @val could you please help on this – banu Jan 04 '17 at 09:38

0 Answers0