My query would use: doc['field_name'].value, but I'd like to know how
is this mapped in Lucene. Does this use an approach similar to field
cache? so for example 'field_name' is loaded as an array of primitive
types or string indexes? (using more memory but being search time
efficient) Or is this computed getting the matching documents from
Lucene and for each then getting the field with 'field_name'? (being
memory inexpensive but search time more costly) I am asking this
because the performance is very different in both approaches and I
couldn't find the docs about this.
doc['field_name'].value uses a similar concept to field cache (though more
advanced), all values for the field are loaded to memory and keyed by doc
id.
My query would use: doc['field_name'].value, but I'd like to know how
is this mapped in Lucene. Does this use an approach similar to field
cache? so for example 'field_name' is loaded as an array of primitive
types or string indexes? (using more memory but being search time
efficient) Or is this computed getting the matching documents from
Lucene and for each then getting the field with 'field_name'? (being
memory inexpensive but search time more costly) I am asking this
because the performance is very different in both approaches and I
couldn't find the docs about this.
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.