The reason why we are doing this is to ensure consistency from our API query.
The query engine does not need to know if the field is a text or keyword.
Whenever we need to query for keyword, we just use "field.keyword", etc.
Is ES indexing the same field twice with exact same result in such _mappings?
I understand.
My intend is to make the field exact match only. But I don't want the query engine to keep a list of which field to query with "xyz" and which to query with "xyz.keyword"; therefore, I unconditionally created a "keyword" field regardless of "text" or "keyword".
With below example. The query engine will performa exact match with either "aaa.keyword" or "bbb.keyword".
If query is "aaa" or "bbb", then it might find partial match with "aaa" but only returns exact match with "bbb", etc.
This simplifies the lucene json payload for query generation.
But does this cause wasted index space for the field "bbb"? This is my question.
Our cluster has grown very fast, and I'm weighting the pros & cons of everything we 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.