弹性搜索如何执行模糊“相关性得分”查询速度非常快? [英] How does Elasticsearch perform fuzzy "relevancy score" queries very fast?

查看:82
本文介绍了弹性搜索如何执行模糊“相关性得分”查询速度非常快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,为了弹性搜索执行涉及相关性分数的模糊查询,它必须遍历并计算所有可能的匹配(可能包括数千或数百万行)的相关性,即使查询上的限制仅为10。


解决方案

在Lucene 4中,模糊的搜索修剪搜索空间,而不是像以前一样强制执行:



Lucene的FuzzyQuery在4.0中快了100倍



希望ElasticSearch将更新到Lucene 4。


As I understand it, in order for Elasticsearch to execute "fuzzy" queries that involve a "relevancy score", it must iterate through and calculate relevancy for all possible matches (possibly including thousands or millions of rows), even if the "limit" on the query is only "10".

How is Elasticsearch able to accomplish this while at the same time providing reasonable response times?

解决方案

In Lucene 4, fuzzy searches prune the search space rather than brute-forcing it as before:

Lucene's FuzzyQuery is 100 times faster in 4.0

Hopefully, ElasticSearch will be updated to Lucene 4 soon.

这篇关于弹性搜索如何执行模糊“相关性得分”查询速度非常快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆