Maybe its simple or stupid, but I didnt find an answer to this
question: Is there a way to index fields, but not to store them? I
have large text fields where I just want to search for a word, but
never really return the whole field. What would be a good (meaning
memory efficient) way to do this?
Maybe its simple or stupid, but I didnt find an answer to this
question: Is there a way to index fields, but not to store them? I
have large text fields where I just want to search for a word, but
never really return the whole field. What would be a good (meaning
memory efficient) way to do this?
Thanks in advance!
Andrej
Hello Andrej,
Fields are never stored on their own appart from _source. Since 0.18
it's possible to exclude fields from being stored in _source. You can
set this setting by manually defining the mappings before indexing,
with a syntax similar to:
Jérémie I think what you say is not completely right. Fields can be
configured in mapping to be stored even if by default most of core fields
have store set to no. When the value of a field is fetched, it can be
fetched from the stored value in lucene index or extracted from the stored
_source (if _source is enabled which is the default).
For the big text fields you want to index but don't want to retrieve you
can set "store" to "no" for these fields.
Hello Andrej,
Jérémie I think what you say is not completely right. Fields can be
configured in mapping to be stored even if by default most of core fields
have store set to no. When the value of a field is fetched, it can be
fetched from the stored value in lucene index or extracted from the stored
_source (if _source is enabled which is the default).
For the big text fields you want to index but don't want to retrieve you can
set "store" to "no" for these fields.
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.