Kept include_in_all:false in mapping?


If i kept include_in_all:False for a field in mapping then whether that field is searchable or not?
If i kept include_in_all:True in mapping and index:false for a field whether i can able to search the
the field?


Hi @Yaswanth,

include_in_all just prevents this field from being added to a somewhat magic field, called _all that is used as a catch-all field if you do simple queries and don't specify in which fields Elasticsearch should look. So if you set include_in_all to false these searches will indeed not find the respective documents anymore (see also the Definitive Guide).

The gist is that you need you specify that you want to search in that specific field. Then everything is fine. If you - however - also set index:false you're telling Elasticsearch that you do not want to index this field and it is thus not searchable.


Thanks :slight_smile: @danielmitterdorfer

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.