5

Got 2 fields (name & description), using a Danish analyzer. Now I need to support it with an English analyser too.

What is my solutions?

  1. Add more analysers on the fields?
  2. Set the language when looking up? (don't think this works, because the data wouldn't be analyzed)
  3. have 2 extra fields name_en & description_en?

1 Answers1

3

Use a multi-field where the name and description use your Danish analyzer. Then have a field like name.en and description.en use an English analyzer.

http://www.elasticsearch.org/guide/reference/mapping/multi-field-type/

Matt Weber
  • 342
  • 2
  • 5
  • Will test it out, just going to be expensive, when this project going to be rolled out (in some few years) to 60-80 countries. Then I need to have 2 fields for each language. – Kim Egede Jakobsen Jun 11 '13 at 07:02