elasticsearch - Elastic search map multiple fields to a single field -


does elastic search provide functionality map different fields single field , use single field search.

for eg _all refers fields in docs.

similarly have mapping configuration define field referring multiple fields.

eg : have field called brand,name,category.

i need map brand , name single field custome_field.

i want during mapping time , not during query time. know cross fields during query time.

take @ copy_to functionality. acts custom _all. see here more this:

in metadata: _all field explained special _all field indexes values other fields 1 big string. having fields indexed 1 field not terribly flexible though. nice have 1 custom _all field person’s name, , custom _all field address.

elasticsearch provides functionality via copy_to parameter in field mapping:

put /my_index {     "mappings": {         "person": {             "properties": {                 "first_name": {                     "type":     "string",                     "copy_to":  "full_name"                  },                 "last_name": {                     "type":     "string",                     "copy_to":  "full_name"                  },                 "full_name": {                     "type":     "string"                 }             }         }     } } 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -