Discard results in boolean queries under conditions


(@mromagnoli) #1

Hi group, I've been wondering if is there some method where I can discard
results in boolean queries if the 'should' part does not find anything.
I am querying with 'should' and 'must' parts, but for me is only relevant
if there is some result 'in the should section'. Was I clear?¿

Thanks in advance :wink:

--
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.


(Nik Everett) #2

On Wed, Oct 16, 2013 at 10:52 AM, Marce Romagnoli <marce.romagnoli@gmail.com

wrote:

Hi group, I've been wondering if is there some method where I can discard
results in boolean queries if the 'should' part does not find anything.
I am querying with 'should' and 'must' parts, but for me is only relevant
if there is some result 'in the should section'. Was I clear?¿

Are you looking for minimum_should_match?

--
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.


(@mromagnoli) #3

Ohh thats right! Now I feel kind of embarrassing, it was there in the docs
hehe.

Thanks Nikolas!

El miércoles, 16 de octubre de 2013 12:01:03 UTC-3, Nikolas Everett
escribió:

On Wed, Oct 16, 2013 at 10:52 AM, Marce Romagnoli <marce.r...@gmail.com<javascript:>

wrote:

Hi group, I've been wondering if is there some method where I can discard
results in boolean queries if the 'should' part does not find anything.
I am querying with 'should' and 'must' parts, but for me is only relevant
if there is some result 'in the should section'. Was I clear?¿

Are you looking for minimum_should_match?

--
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.


(system) #4