Elasticsearch忽略字符“à”

时间:2018-06-28 13:28:07

标签: elasticsearch

我在Elasticsearch中有一个文本字段,并且正在http://localhost:9200/_search上执行以下POST查询:

    {
  "query": {
    "match": {
      "text": "città"
    }
  },
  "highlight": {
    "number_of_fragments": 1,
    "fields": {
      "text": {
        "pre_tags": "<em>",
        "post_tags": "</em>"
      }
    }
  }
}

我遇到的问题是突出显示的响应包含如下结果:

In italian city is called <em>citt</em>à and so here...

标记中不包含“à”字符...我在做什么错了?

谢谢!

编辑 根据要求,这是我的映射。在这一点上,我认为问题在于分析仪...

{
  "MYINDEX": {
    "mappings": {
      "document": {
        "properties": {

          ...OTHER STUFF...

          "text": {
            "type": "text",
            "analyzer": "pattern"
          },
          "user": {
            "type": "text"
          }
        }
      }
    }
  }
}

0 个答案:

没有答案