define analyzer globally (ES)

后端 未结 1 505
名媛妹妹
名媛妹妹 2021-02-15 17:17

I need/want to define my custom analyzers globally. therefore I edited the configuration file of ES (elasticsearch.yml) according to this answer: Can I customize Elastic Search

相关标签:
1条回答
  • 2021-02-15 18:11

    The problem was with the URL in the curl statement. credit goes to Ivan ( https://groups.google.com/forum/#!topic/elasticsearch/5XlUoghKURg )

    I'm quoting his answer from the group:

    You cannot use a custom analyzer until it is referenced by an index. You would need to create a mapping that uses the analyzer and then use that index in the analyzer call. There is no need to index any documents to that index.

    curl -XGET 'localhost:9200/SOMEINDEX/_analyze?analyzer=angram'

    0 讨论(0)
提交回复
热议问题