0

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?

4

1 回答 1

0

我找到了解决方案。只需将 CATEGORY 索引为 not_analyzed,然后运行术语查询。有效。

于 2012-06-12T08:14:15.233 回答