Kibana 运行自由文本搜索查询时出现错误“[标准]标记筛选器已被删除,”

ulmd4ohb  于 2023-04-27  发布在  Kibana
关注(0)|答案(1)|浏览(233)

我正在尝试运行下面的查询

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

我得到了异常“The [standard] token filter has been removed”
这个查询我用来做一个文本搜索在所有的领域,同样的查询是运行在我的开发服务器,但在生产它不工作
下面是我的索引的设置

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"
        
        
      }
    
}
}

有什么解决的办法吗

i7uq4tfw

i7uq4tfw1#

ES 7中的standard标记过滤器has been removed,因为它只是一个占位符,没有任何作用。
您需要将它们从case_insensitive_sort分析器中删除

"case_insensitive_sort": {
          "filter": [
            "standard",             <----- remove this
            "lowercase",
            "trim"
          ],

相关问题