ElasticSearch mapping doesn't work

后端 未结 2 635
不知归路
不知归路 2021-02-14 16:48

I\'m trying to set up an ElasticSearch index with different analyzers for the individual fields. However, I can\'t seem to find a way to set field-specific analyzers; here\'s ho

2条回答
  •  你的背包
    2021-02-14 17:37

    To use a field-specific analyzer you need to specify this field in the query. Otherwise, default analyzer is used. Try

    curl -XGET 'localhost:9200/twitter/_search?q=message:fight'
    

    or

    curl -XGET 'localhost:9200/twitter/_search?df=message&q=looking'
    

提交回复
热议问题