I am doing the following query in elasticsearch:
{"size":20000,"query":{"filtered":{"query":{match_all:{}},"filter":{"or":[{"term":{CATEGORY:"diamonds"}},{"term":{CATEGORY:"fashion"}}]}}}}
This works fine. What I need now is that the CATEGORY
has names such as Men Clothing
and Men Accessories
. So I want to do a text query. But when I replaced term with text
, it didnt work for me. What to do?