I am doing a terms aggregation on documents that yields me field name and count of it. The query works fine for many fields but not for specific fields.
The query is below and it fetches me the appliance types and their counts in buckets for a given time range. This query does NOT work when i use a different field (say sale.items.item.item_desc). Could this be a problem with index or something? Can someone please help me get through?
I suppose that you are trying to use text fields (in your mapping) for aggregations which does not work (it should also be mentioned in the response of your request, when you take a look). You can only run aggregations on keyword fields, as a certain data structure is required on disk.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.