Hi everyone,
In my mapping properties, for one of the fields, I added "index : false" , but ElasticSearch is still indexing it and this field is still searchable. However, when I ask for the mapping, I do have:
"name" : {
"type" : "text",
"index" : false
},
Do I need to add something else to make it unindexed and unsearchable ?
Thank you,
Clement
Thank you for your fast reply!
I'm using Elasticsearch 6.2, and i forgot to mention that i'm also using Elasticquent.
My bad, I do have the same error when I query on this field. So this field is really unsearchable.
But is it normal that the field "name" and it's value still appear in the results among the other fields when I query : "http://localhost:9200/myIndex/_search?q=Mediolanum" for example ? Is it possible to completely remove so I can free some space on the future Elasticsearch server.
Yes. By default the entire document is stored in the special field _source as it was passed to elasticsearch. It is done independently from indexing, so your mapping doesn't have any effect on how source is stored.
There are few ways to remove these fields from the source. The fastest way would be not to send these fields to elasticsearch in the first place. If your indexing layer is inflexible, you can remove such fields using ingest node. Or you can exclude fields from the source when the source is stored.
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.