I have a code like below where I'm doing multiple must in bool query. Here
I'm passing the must term queries in field "address". Now the ip address
will come to me as a list from other api and I have to pass for all the
ip's in the list as a must term query. Here I'm not getting a way how to
pass the address values dynamically when creating the QueryBuilder.
Please suggest how to do this.
public static SearchResponse searchResultWithAggregation(String es_index,
String es_type, List ipList, String queryRangeTime) {
Client client = ESClientFactory.getInstance();
Off the top of my head, you can either using a nested bool query for the IP
address or use a terms query with the minimum match set to the size of the
list.
On Wed, Jun 4, 2014 at 10:39 AM, Subhadip Bagui i.bagui@gmail.com wrote:
I have a code like below where I'm doing multiple must in bool query. Here
I'm passing the must term queries in field "address". Now the ip address
will come to me as a list from other api and I have to pass for all the
ip's in the list as a must term query. Here I'm not getting a way how to
pass the address values dynamically when creating the QueryBuilder.
Please suggest how to do this.
public static SearchResponse searchResultWithAggregation(String es_index,
String es_type, List ipList, String queryRangeTime) {
Client client = ESClientFactory.getInstance();
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.