Elasticsearch case-insensitive query_string query with wildcards

前端 未结 2 530
遇见更好的自我
遇见更好的自我 2021-01-21 10:36

In my ES mapping I have an \'uri\' field which is currently set to not_analysed and I\'m not allowed to change the mapping.I wanted to search for uri parts with a query_string q

2条回答
  •  面向向阳花
    2021-01-21 11:18

    From the docs, it seems like you need a new analyzer that first transforms to lowercase and then can run the search. Have you tried that? http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/sorting-collations.html

    As I read it, your pattern, lowercase_expanded_terms, only applies to expansions, not to regular words http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html lowercase_expanded_terms Whether terms of wildcard, prefix, fuzzy, and range queries are to be automatically lower-cased or not (since they are not analyzed). Default it true

提交回复
热议问题