Elasticsearch asciifolding,不区分大小写

时间:2017-10-05 21:41:08

标签: elasticsearch case-insensitive

我在Elasticsearch上添加了asciifolding分析器。它工作正常,但现在搜索区分大小写。

这是用于更新索引的配置:

curl -XPUT 'localhost:9200/centro/_settings?pretty' -H 'Content-Type: application/json' -d'
{
  "settings" : {
   "analysis" : {
    "analyzer" : {
     "default" : {
      "tokenizer" : "standard",
      "filter" : ["lowercase", "asciifolding"]
     }
    }
   }
  }
 }'

以下是Centro实体映射:

"mappings":{
      "centro":{
        "properties":{
          "codigoCentro":{"type":"string"},
          "codigoComarca":{"type":"long"},
          "codigoDelegacion":{"type":"long"},
          "codigoDistritoMunicipal":{"type":"long"},
          "codigoLocalidad":{"type":"long"},
          "codigoMunicipio":{"type":"long"},
          "codigoNaturaleza":{"type":"long"},
          "codigoTitularidad":{"type":"long"},
          "comarca":{"type":"string"},
          "cp":{"type":"string"},
          "delegacion":{"type":"string"},
          "direccion":{"type":"string"},
          "distritoMunicipal":{"type":"string"},
          "id":{"type":"long"},
          "localidad":{"type":"string"},
          "nombre":{"type":"string"},
          "telefono":{"type":"string"},
          "titularidad":{"type":"string"},
          "usuario":{
            "properties":{
              "activated":{"type":"boolean"},
              "email":{"type":"string"},
              "firstName":{"type":"string"},
              "id":{"type":"long"},
              "langKey":{"type":"string"},
              "login":{"type":"string"}
             }
          },
          "xGEO":{"type":"string"},
          "yGEO":{"type":"string"},
         }
        }
       }

我哪里错了?谢谢!

0 个答案:

没有答案