elasticsearch - Elastic custom filed types -
this related one of other question in elastic
i have index 150 fields in different tables , want of them able searched partially.
one thing can (as in answer above question) set analyzer , search analyzer in fields want partially searched.
but sure elastic having better way of doing it. can define own field type 'string' analyzers preset , set type fields required partially searched?
i not sure if can define own type. can achieve using dynamic templates
.
use dynamic templates
:
put /my_index { "mappings": { "my_type": { "dynamic_templates": [ { "analysed_string_template": { "match": "*_sometext", "match_mapping_type": "string", "mapping": { "type": "string", "analyzer": "your_analyser" } } } ] } } }
this make string ends sometext
analysed.you can change "match"
field per requirement. study dynamic_templates
here
hope helps..
Comments
Post a Comment