I'm trying to index a document that has 1000s of fields, i'm only interested if the search text exists in the document. not searching on the specific field.
I understand that v5 had an _all field which indexed the aggregation of text from all fields, whereas this was removed in v6 , but can be replicated using copy_to on the source field to the target field. However i don't want to index the source field as well, and I cant combine copy_to and enabled: false on the field
here's my test case which is failing in ElasticSearch service 'test'
DELETE alltest
PUT alltest
{
"mappings": {
"doc": {
"properties" : {
"all": {"type": "text"},
"firstname": {"type" : "text", "copy_to": "all", "enabled": false},
"surname": {"type" : "text", "copy_to": "all", "enabled": false}
}
}
}
}
PUT alltest/doc/1
{
"firstname": "molly",
"surname": "miggings"
}
This gives :
"reason": "Mapping definition for [firstname] has unsupported parameters: [enabled : false]"
if i make enabled : true , then molly is indexed in all and firstname, if I make type: object then molly is not indexed in all and firstname is not indexed.
I want molly indexed in all, but firstname not indexed.