elasticsearch all enabled为true,关键字令牌分析器不返回任何结果,elasticsearch,lucene,elasticsearch,Lucene" /> elasticsearch all enabled为true,关键字令牌分析器不返回任何结果,elasticsearch,lucene,elasticsearch,Lucene" />

elasticsearch all enabled为true,关键字令牌分析器不返回任何结果

elasticsearch all enabled为true,关键字令牌分析器不返回任何结果,elasticsearch,lucene,elasticsearch,Lucene,我在下面给出的弹性搜索中使用关键字令牌分析器 { "settings" : { "analysis" : { "analyzer" : { "default" : { "type" : "keyword" } } } } } 我的订单映射在这里 { "order": { "

我在下面给出的弹性搜索中使用关键字令牌分析器

{
    "settings" : {
        "analysis" : {
            "analyzer" : {
                "default" : {
                    "type" : "keyword"
                }
            }
        }
    }
}
我的订单映射在这里

{
    "order": {
        "_all": {"enabled" : true},
        "properties": {
            "OrderData": {
                "properties": {
                    "BusinessRuleData": {
.........
}
现在,当我使用以下json进行查询时

{
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "default_field": "_all",
            "query": "SomeText"
          }
        }
      ]
    }
  }
}

我没有得到任何结果。如果我把分析器改为“标准”,那么所有的搜索都可以正常工作。任何答案都将不胜感激

我认为它可能是整体索引的。我认为我们必须搜索整份没有意义的文件。关键是我们必须使用标准的标记器来建立所有的索引

我所做的更改是使用带有标记器的自定义分析器作为“标准”,并为_all字段定义该分析器。