I understand that Elasticsearch analyzes text fields and saves the resulting tokens in an inverted index data structure. But I am a bit confused regarding how does Elasticsearch stores other fields, like integer, float, and keyword? Does it treat values of these fields as tokens (without breaking further into tokens) and stores those values in an inverted index as it is? Or does it store those values in a separate data structure?
So this means that numeric and keyword types both have doc_values enabled by default, in order to optimize and support aggregation, sorting and lookup on those fields. But with numeric types there is an additional metadata stored, which is specifically to make range queries more efficient.
Please let me know if my understanding is correct.
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.