Henry_2
(Henry Jeong)
July 29, 2013, 10:18am
1
Hi all.
First,
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery("search_field",
"term1", "term2").minimumMatch(2));
Second,
QueryBuilders.boolQuery().should(QueryBuilders.termsQuery("search_field",
"term1", "term2").minimumMatch(2));
I think, a search result will be same which are first and second case.
What do you think about it?
I will look forward your comment.
Thank you.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
dadoonet
(David Pilato)
July 29, 2013, 12:51pm
2
Hey,
Look here: Elasticsearch Platform — Find real-time answers at scale | Elastic
In a boolean query with no must clauses, one or more should clauses must match a document.
So with only one should clause and no must, the should clause is equivalent to the must clause.
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs
Le 29 juil. 2013 à 12:18, Henry sophistlv@gmail.com a écrit :
Hi all.
First,
QueryBuilders.boolQuery().must(QueryBuilders.termsQuery("search_field", "term1", "term2").minimumMatch(2));
Second,
QueryBuilders.boolQuery().should(QueryBuilders.termsQuery("search_field", "term1", "term2").minimumMatch(2));
I think, a search result will be same which are first and second case.
What do you think about it?
I will look forward your comment.
Thank you.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
Henry_2
(Henry Jeong)
July 29, 2013, 2:27pm
3
Thank you for your comment.
I understood. ^^
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .