Hi all,
I cannot understand how to filter for two chars strings a simple keyword field. I created the field like this:
"tags": {
"store": True,
"type": "keyword"
},
..the "tags" field is then populated with a list (i.e. [''ai", "iot"] and filtered using:
"query": {
"terms":{
"tags": tags
}
..which works fine for filtering documents tags by "iot", but does not return any result when filtering by "AI".
..what am I missing? I Googled and dived in the official doc for hours but I cannot figure it out. The only references that I found about a minimum length are referred to ngrams, which I am not using (right?).
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
Nevermind, it was a case-sensitiveness problem together with poor test coverage on my code.
Sorry for not having posted a full recreation script, I would have spotted the problem and avoided a useless topic. My bad.
So the answer is no, it is not true that filtering for two chars strings on keyword field does not work. But check for case as it is a case sensitive field.
Sorry for not having posted a full recreation script, I would have spotted the problem and avoided a useless topic. My bad.
No worries. That's why we are often asking for simple recreation script as most of the time users are finding themselves what the problem is and how to solve.
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.