0

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.

1 Answer 1

1

Query String query will be useful here:

GET /_search
{
    "query": {
        "query_string" : {
            "query" : "red sleeveless",
            "default_operator": "AND"
        }
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.