Class BoostRanker
- java.lang.Object
-
- io.milvus.v2.service.collection.request.CreateCollectionReq.Function
-
- io.milvus.v2.service.vector.request.ranker.BoostRanker
-
public class BoostRanker extends CreateCollectionReq.Function
The Decay reranking strategy, which by adjusting search rankings based on numeric field values. Read the doc for more info: https://milvus.io/docs/decay-ranker-overview.mdExample: BoostRanker boost = BoostRanker.builder() .name("xxx_boost") .description("boost on xxx") .filter("xxx == 2") .weight(0.5) .randomScoreSeed(123) .randomScoreField("id") .build()
You also can declare a decay ranker by Function CreateCollectionReq.Function boost = CreateCollectionReq.Function.builder() .functionType(FunctionType.RERANK) .name("xxx_boost") .description("boost on xxx") .param("reranker", "boost") .param("filter", "xxx == 2") .param("weight", "0.5") .param("random_score", "{\"seed\": 123, \"field\": \"id\"}") .build();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBoostRanker.BoostRankerBuilder-
Nested classes/interfaces inherited from class io.milvus.v2.service.collection.request.CreateCollectionReq.Function
CreateCollectionReq.Function.FunctionBuilder<T extends CreateCollectionReq.Function.FunctionBuilder<T>>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BoostRanker.BoostRankerBuilderbuilder()StringgetFilter()FunctionTypegetFunctionType()Map<String,String>getParams()StringgetRandomScoreField()LonggetRandomScoreSeed()FloatgetWeight()-
Methods inherited from class io.milvus.v2.service.collection.request.CreateCollectionReq.Function
getDescription, getInputFieldNames, getName, getOutputFieldNames, setDescription, setFunctionType, setInputFieldNames, setName, setOutputFieldNames, setParams, toString
-
-
-
-
Method Detail
-
getFunctionType
public FunctionType getFunctionType()
- Overrides:
getFunctionTypein classCreateCollectionReq.Function
-
getParams
public Map<String,String> getParams()
- Overrides:
getParamsin classCreateCollectionReq.Function
-
getFilter
public String getFilter()
-
getWeight
public Float getWeight()
-
getRandomScoreSeed
public Long getRandomScoreSeed()
-
getRandomScoreField
public String getRandomScoreField()
-
builder
public static BoostRanker.BoostRankerBuilder builder()
-
-