As I understand it, Elastic Search will automatically store whatever
JSON is passed into the source, no matter what fields are passed in
the mapping (even if the type mapping is set to dynamic:false), when I
do this?
Is that correct? And, as a matter of best practice, is it better just
to leave non-searched fields out of the mapping and just let them be
returned in the source, would this bring any performance benefits?
As I understand it, Elastic Search will automatically store whatever
JSON is passed into the source, no matter what fields are passed in
the mapping (even if the type mapping is set to dynamic:false), when I
do this?
correct
Is that correct? And, as a matter of best practice, is it better just
to leave non-searched fields out of the mapping and just let them be
returned in the source, would this bring any performance benefits?
There is a mapping for every field that you include in the _source.
You can control what happens to each field with (amongst other things)
the "index" parameter:
analyzed
not_analyzed (searchable, but not processed by analyzers)
no (not searchable)
So if you don't want certain fields to be searchable at all, then just
set them to {index: "no"},
As I understand it, Elastic Search will automatically store whatever
JSON is passed into the source, no matter what fields are passed in
the mapping (even if the type mapping is set to dynamic:false), when I
do this?
correct
Is that correct? And, as a matter of best practice, is it better just
to leave non-searched fields out of the mapping and just let them be
returned in the source, would this bring any performance benefits?
There is a mapping for every field that you include in the _source.
You can control what happens to each field with (amongst other things)
the "index" parameter:
analyzed
not_analyzed (searchable, but not processed by analyzers)
no (not searchable)
So if you don't want certain fields to be searchable at all, then just
set them to {index: "no"},
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.