[英]Need a customized index in the elasticsearch
My query is, if i search for a keyword "apparel" my current result is 我的查询是,如果我搜索关键字“服装”,则当前结果是
{
"_index":"myindex",
"_type":"pages",
"_id":"www.abc.com",
"_score":1.726047,
"_source":{
"organization_website":"www.abc.com",
"organization_values":[
{
"unpsc":15,
"industry":"apparel",
"codevalue":0.15
},
{
"unpsc":20,
"industry":"textile",
"codevalue":0.2
}
]
}
}
I can override the _score in Elasticsearch using function score, but i need to add the add the score (which i have created) as the default score in the index. 我可以使用函数score覆盖Elasticsearch中的_score,但是我需要在索引中添加添加的分数(我创建的分数)作为默认分数。 For instance if i search for the keyword "apparel", the default score will 1 , but i want to override the score of the apparel (which i have created) ie unpsc value to the score.
例如,如果我搜索关键字“服装”,则默认分数将为1,但我想覆盖服装的分数(由我创建),即将unpsc值分配给该分数。
Is this possible to create a index in the elasticsearch to refer an another node as a default score or i have go with the function score/ boost.....? 这有可能在elasticsearch中创建一个索引来引用另一个节点作为默认分数吗?还是我使用了功能分数/ boost .....?
I don't think it's possible to assign a default score based on some value. 我认为不可能根据某些值分配默认分数。
You'll have to use function score as suggested by yourself. 您必须使用自己建议的功能评分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.