Hi,
I have a scenario where i need to get documents related to multiple keywords.
here's the query:
{
"query":{
"filtered": {
"query" : {
"constant_score" : {
"filter" : {
"bool" : {
"should" : [
{ "terms" : {"allTags" : ["woodland shoes"]}}
]
}
}
}
},
"filter" : {
"bool" : {
"should" : [
{ "terms" : {"allTags" : ["amazon", "snapdeal" ]}}
]
}
}
}
}
}
in the mapping for allTags i have used my own analyzer with white space tokenizer also still
this doesn't return any documents, however
{
"query":{
"filtered": {
"query" : {
"constant_score" : {
"filter" : {
"bool" : {
"should" : [
{ "terms" : {"allTags" : ["woodlandshoes"]}}
]
}
}
}
},
"filter" : {
"bool" : {
"should" : [
{ "terms" : {"allTags" : ["amazon","snapdeal"]}}
]
}
}
}
}
}
returns documents.
Can any explain me why its behaving differently.