[英]Elasticsearch search on number field
I am new to elasticsearch. 我是Elasticsearch的新手。 Apologies if the question sounds very basic. 很抱歉,这个问题听起来很基本。 I am not able to get the answer directly from the documentations. 我无法直接从文档中获得答案。
Is there a way to do a search on number field with the returned docs score ranked based on how close the number is to the input filter. 有没有一种方法可以对数字字段进行搜索,并根据数字与输入过滤器的接近程度对返回的文档分数进行排名。 I mean, 我的意思是,
Is it possible with elasticsearch? elasticsearch有可能吗?
我建议您对弹性响应进行排序,如果您必须在elasticsearch中进行处理,则可以查看stript_score函数: https ://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function- score-query.html#function-script-score 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.