弹性查询中通配符的意义
Significance of wildcard in elastic query
我搜索的时候在elastic search
*我的搜索和唯一
我的搜索
结果集相同。但是 *mysearch 需要很多时间。
那么这里的通配符有什么意义呢?
*
字符称为通配符,可让您搜索 "end with" 某些内容的字词,例如*mysearch
将搜索以 mysearch
结尾的字词
通配符搜索通常更昂贵,因为所有术语都需要按照 query_string
查询(Kibana 在后台使用)的 official documentation 中的解释进行检查
Allowing a wildcard at the beginning of a word (eg "*ing") is
particularly heavy, because all terms in the index need to be
examined, just in case they match. Leading wildcards can be disabled
by setting allow_leading_wildcard to false.
我搜索的时候在elastic search *我的搜索和唯一 我的搜索
结果集相同。但是 *mysearch 需要很多时间。
那么这里的通配符有什么意义呢?
*
字符称为通配符,可让您搜索 "end with" 某些内容的字词,例如*mysearch
将搜索以 mysearch
通配符搜索通常更昂贵,因为所有术语都需要按照 query_string
查询(Kibana 在后台使用)的 official documentation 中的解释进行检查
Allowing a wildcard at the beginning of a word (eg "*ing") is particularly heavy, because all terms in the index need to be examined, just in case they match. Leading wildcards can be disabled by setting allow_leading_wildcard to false.