Match query with "the" text parsed using "OR" even specified "AND" in the operator field

Hi,

I have a match query that search a field with AND operator. When the text
contain "the" eg : "the house" it will return all the matching of "
house" instead of "the house" in the result even i specified operator
: "AND". However it behaving well if the text doesn't contain "the" eg
: "*crowded house". *To me it seems like it ignore the "the" in query text.

The query with "the" :

{
"explain": true,
"query" : {
"match_phrase" : {
"PERFORMER" : {
* "query" : "the house",*
"operator" : "and"

    }
    }
}
}

}
}

*Result : *
1)
"PERFORMER": "Crowded House",

"_explanation": {
"value": 6.4987273,
"description": "weight(*PERFORMER:house *in 1171039)
[PerFieldSimilarity], result of:",
"details": [

"PERFORMER": "House Of Downtown",

"_explanation": {
"value": 6.4987273,
"description": "weight(PERFORMER:house in 381)
[PerFieldSimilarity], result of:",

*The query with "crowded house" : *

{
"explain": true,
"query" : {
"match_phrase" : {
"PERFORMER" : {
* "query" : "crowded house",*
"operator" : "and"

    }
    }
}
}

}
}

Result :

"PERFORMER": "Crowded House",
"_explanation": {
"value": 14.409363,
"description": "weight(*PERFORMER:"crowded house*" in
3183) [PerFieldSimilarity], result of:",

"PERFORMER": "Crowded House",
"_explanation": {
"value": 13.537326,
"description": "weight(*PERFORMER:"crowded house*" in
23752) [PerFieldSimilarity], result of:",
"details": [

Thanks.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/971e8240-ff72-4249-8e02-33825a363666%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The match query analyzes your text (usind the standard analyzer by
default). I'm assuming you're using an ES version prior to 1.0, in which
case the standard analyzer will remove "the" as a stopword. You can easily
verify this by overriding the analyzer in your query like for example:

{
"explain": true,
"query": {
"match_phrase": {
"PERFORMER": {
"query": "the house",
"operator": "and",
"analyzer": "whitespace"
}
}
}
}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3520bd6b-c4b5-4c33-b4c5-af5473e9d340%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.