Hi all:
I have discovered a method for reducing the elasticsearch fields. For instance, if there are three keyword fields in an index and they are solely utilized for term queries, then I directly employ a single keyword field and store it in an array format. Could this effectively prevent the field explosion resulting from an excessive number of fields?
And I'm not sure if this would have an impact on the index size and query performance. Could someone help me with that? Thank you.
That will reduce the number of fields, but at the same time prevent you from searching only one of the fields for a specific value (which you may be OK with). The flattened field type does what you describe behind the scenes to find possible matching documents but then automatically checks if it is the correct field that has the value.
thanks for your reply。It's really help for me。