索引的索引文档如下所示:
[ElasticType(
Name = "tag",
DateDetection = true,
NumericDetection = true,
SearchAnalyzer = "standard",
IndexAnalyzer = "standard"
)]
public class TagIndexDto : AbstractIndexDto
{
[ElasticProperty(Index = FieldIndexOption.analyzed, OmitNorms = true)]
public string Name { get; set; }
[ElasticProperty(Index = FieldIndexOption.analyzed, OmitNorms = true)]
public string Description { get; set; }
[ElasticProperty(AddSortField = true)]
public int FollowerCount { get; set; }
[ElasticProperty(AddSortField = true)]
public int ProductCount { get; set; }
[ElasticProperty(AddSortField = true)]
public int CatalogCount { get; set; }
}
我想要做的是对3个计数(最后3个字段)的值进行特定提升。并且提升应该是可配置的,这意味着在索引时不知道提升的确切值。 这实际上是由lucene支持的吗? ES?或者我正在寻找一个不存在的功能?
由于 罗马
答案 0 :(得分:1)
在elasticsearch中,可以使用Custom Filters Score Query(更快但灵活性更低)或Custom Score Query(更慢但更灵活)来完成