作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想根据数字与查询的接近程度对我的文档进行评分。鉴于我有两个文档 document1.field = 1
和 document2.field = 10
,查询 field = 3
然后我想要 document1 ._score > document2._score
。或者换句话说,我想要类似数字的模糊查询。我将如何实现这一目标?用例是我想支持价格查询(精确或范围),但想要对不完全在边界内的东西进行排名。
最佳答案
您正在寻找Decay functions :
Decay functions score a document with a function that decays depending on the distance of a numeric field value of the document from a user given origin. This is similar to a range query, but with smooth edges instead of boxes.
关于Elasticsearch 根据数字与查询的接近程度进行评分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15880103/
我目前正在研究数据库,我看到 degree 和 cardinality 用作相同的术语,或在某些其他学位定义为否。关系中涉及的实体的数量,并进一步分类为一元、二元和三元。 某些放置度数定义为关系类型的
我是一名优秀的程序员,十分优秀!