Reputation: 517
I am pretty new to elasticsearch query. my query will be like
red dresses
or red sleeveless
in my elasticsearch a sample document structure is as shown below:
INDEX NAME="cloths", TYPE_NAME="dresses"
"_source": {
"product_filter": {
"brand": "abc",
"price": 100,
"colour": "red",
"sleeve": "sleeveless"
}
}
both the term in query has to be matched.
Upvotes: 0
Views: 73
Reputation: 4883
Query String query will be useful here:
GET /_search
{
"query": {
"query_string" : {
"query" : "red sleeveless",
"default_operator": "AND"
}
}
}
Upvotes: 1