I have a question. Is there a possibility to perform a bool search with should and have also the number of hits per should clause in perhaps a aggregate function.
I would need this to build up a statistic.
A possible solution would be to perform the search individual (single) for each term and aggregate this later in the program. But I would like to have this in one query because we have many should aspects in the query.
Is there a better way rather using single queries?
If you don't care about document results (i.e. size = 0) or the overall total and don't use any kind of fancy minimum_should_match or other things in the query part, you can also use "match_all" for the query part.
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.