Expected behavior with stopword in "must" clause?


(Tejus Parikh) #1

What's the expected behavior when you have a bool query with a stop word in
the "must" clause? On our setup, a query with a stop word will return zero
results.

For example:
{
"query" :
{
"bool" : {
"must" : {
"term" : { "body" : "iphone" }
}
}
}
}

returns some 16000 results on our document index. However:

{
"query" :
{
"bool" : {
"must" : {
"term" : { "body" : "iphone" }
},
"must" : {
"term" : { "body" : "on" }
}
}
}
}

returns zero.

thanks!


(Shay Banon) #2

Yep, thats the expected behavior, since the second must clause won't match
any docs.

On Wed, Aug 3, 2011 at 7:05 PM, Tejus Parikh tejus@vijedi.net wrote:

What's the expected behavior when you have a bool query with a stop word in
the "must" clause? On our setup, a query with a stop word will return zero
results.

For example:
{
"query" :
{
"bool" : {
"must" : {
"term" : { "body" : "iphone" }
}
}
}
}

returns some 16000 results on our document index. However:

{
"query" :
{
"bool" : {
"must" : {
"term" : { "body" : "iphone" }
},
"must" : {
"term" : { "body" : "on" }
}
}
}
}

returns zero.

thanks!


(system) #3