出现错误“[标准] 标记过滤器已被删除。”在运行自由文本搜索查询时

问题描述 投票:0回答:1

我正在尝试运行以下查询

GET /MyIndex_2/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "query": "test"
          }
        }
      ]
    }
  }
}

我收到异常“[标准] 令牌过滤器已被删除”

我正在使用此查询在所有字段中进行文本搜索,相同的查询正在我的开发服务器中运行,但在生产中它不起作用

以下是我的索引设置

PUT analyzed_accounts_consolidated10052020_azure_prod4
{
  "settings": {
    
  
      "index": {
        "number_of_shards": "5",
        "max_result_window": "10000000",
        "analysis": {
          "filter": {
            "synonym_filter_cvtext": {
              "ignore_case": "true",
              "expand": "true",
              "type": "synonym",
              "synonyms_path": "ho2s_filters/synonyms_cvtext.txt"
            },
            "stemmer_it": {
              "type": "stemmer",
              "language": "light_italian"
            },
            "synonym_filter_skills_roles": {
              "ignore_case": "true",
              "expand": "true",
              "type": "synonym",
              "synonyms_path": "ho2s_filters/synonyms_skills_roles.txt"
            },
            "stopwords_it": {
              "type": "stop",
              "stopwords_path": "ho2s_filters/stopwords.txt"
            },
            "synonym_filter_educations": {
              "ignore_case": "true",
              "expand": "true",
              "type": "synonym",
              "synonyms_path": "ho2s_filters/synonyms_educations.txt"
            }
          },
          "analyzer": {
            "analyzer_skills_roles": {
              "filter": [
                "lowercase",
                "synonym_filter_skills_roles",
                "stopwords_it",
                "stemmer_it"
              ],
              "char_filter": [
                "mapping_skills_roles"
              ],
              "type": "custom",
              "tokenizer": "standard"
            },
            "case_insensitive_sort": {
              "filter": [
                "standard",
                "lowercase",
                "trim"
              ],
              "type": "custom",
              "tokenizer": "keyword"
            },
            "analyzer_cvtext": {
              "filter": [
                "lowercase",
                "synonym_filter_cvtext",
                "stopwords_it",
                "stemmer_it"
              ],
              "char_filter": [
                "mapping_skills_roles"
              ],
              "type": "custom",
              "tokenizer": "standard"
            },
            "analyzer_educations": {
              "filter": [
                "lowercase",
                "synonym_filter_educations",
                "stopwords_it",
                "stemmer_it"
              ],
              "char_filter": [
                "mapping_skills_roles"
              ],
              "type": "custom",
              "tokenizer": "standard"
            }
          },
          "char_filter": {
            "mapping_skills_roles": {
              "type": "mapping",
              "mappings_path": "ho2s_filters/mapping_skills_roles.txt"
            }
          }
        },
        "number_of_replicas": "1"
        
        
      }
    
}
}  


解决这个问题的任何建议

elasticsearch kibana elastic-stack elk
1个回答
0
投票

standard
令牌过滤器已在 ES 7 中删除,因为它只是一个占位符,没有做任何事情。

你需要从你的

case_insensitive_sort
分析仪中删除它们

        "case_insensitive_sort": {
          "filter": [
            "standard",             <----- remove this
            "lowercase",
            "trim"
          ],
© www.soinside.com 2019 - 2024. All rights reserved.