I am doing the following query:
{"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?
How is the Category field analyzed/tokenized? If it has a standard
analyzer, it could be that it actually lowercases and tokenizes the "men
clothing" token into two terms "men" and "clothing".
It looks like what you would need is a non-tokenizer (keyword) analyzer on
that field, so you can find it back exactly as you enter it (including
capitalization)?
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?
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?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.