0

我有像“Document se”这样的搜索文本。如果我在 elasticserach 中搜索它,它会根据我不想要的“文档”和“se”词给出结果。我想要由“Document se”文本(不区分大小写)组成的结果。我在使用 elasticserach 的 spring boot 项目中尝试它,但不知道该怎么做。

映射:

{
  "my_index": {
    "aliases": {},
    "mappings": {
      "my": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "id": {
            "type": "keyword"
          },
          "label": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "type": {
            "type": "keyword"
          }
        }
      }
    },
    "settings": {
      "index": {
        "refresh_interval": "1s",
        "number_of_shards": "5",
        "provided_name": "my_index",
        "creation_date": "1558871069777",
        "store": {
          "type": "fs"
        },
        "number_of_replicas": "1",
        "uuid": "X1b0YIgGSOu7vki2RjqjsA",
        "version": {
          "created": "6040399"
        }
      }
    }
  }
}
4

0 回答 0