【发布时间】:2018-08-16 21:04:44
【问题描述】:
我有不同的字段可供查询,例如标题、文本和位置。我想把更多的重量放在位置领域。我从 Elastic Search 中找到了 decay_function,根据这个例子,它完全满足了我的需求:https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#_detailed_example。 但是,我正在使用的系统使用 Hibernate Search 查询。我找到了 Spatial (https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#spatial) 过滤器,但有没有办法用衰变函数替换“within()”?还是通过个性化功能或类似的功能?
我知道我可以使用 within() 但这意味着我必须定义特定的范围。它可以工作,但在我的情况下它不是最佳解决方案。
【问题讨论】:
标签: elasticsearch geolocation hibernate-criteria hibernate-search