Elasticsearch - How to index the same field with different analyzers -
i interested in indexing same text field different analyzers, both stemmed allow inexact matching , shingles proximity matching. blogpost https://www.elastic.co/blog/multi-field-search-just-got-better understand possible, not sure correct way it. should index field twice different fields, each analyzer, or there way specify 2 analyzers same field?
message: { properties: { text: { type: 'string', index: 'analyzed', analyzer: 'custom_text_analyzer', fields: { standard: { type: 'string', index: 'analyzed', analyzer: 'standard' } } } }
here's 1 way it, can add fields onto property , give whatever properties want when index on server. in case, when want reference field query on text.standard instead of text.
Comments
Post a Comment