Index only and do not store in source

I was looking for a feature where i can pass first name, last name as plain string to Elasticsearch and just index these fields so i can search but do not store them in source (Due to PII data).

Came across this copy_to feature where i can store multiple fields from source but the original fields need to be there in source.

Any suggestions please.

Thanks

Welcome to our community! :smiley:

You need to disable that in the mapping, see https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html

1 Like

Thanks @warkolm,

This is exactly what i was looking for, I didn't know that we can exclude certain fields from _source after indexing is done so they are only available for search and not in the _source as plain text.

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