Solr copyfield analog in elastic


#1

we use solr before and now we start using elastic and in solr we used copyfields. it is easy way to add different analyzers for the same value and pass it only once when adding new document. what is the best way to do the same stuff in elastic?


(Nik Everett) #2

Try

"title": { "type": "string", "fields": { "raw": { "type": "string",
"index": "not_analyzed" } } }

You can now query title and it'll use the default analyzer or title.raw and
it'll skip analysis. You can make as many of these fields as you like.


#3

thank u


(system) #4