CosmosLinqExtensions.RRF Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| RRF(Double[]) |
This system function is used to combine two or more scores provided by other scoring functions. For more information, see https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/rrf. This method is to be used in LINQ expressions only and will be evaluated on server. There's no implementation provided in the client library. |
| RRF(Double[], Double[]) |
This system function is used to combine two or more scores provided by other scoring functions. For more information, see https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/rrf. This method is to be used in LINQ expressions only and will be evaluated on server. There's no implementation provided in the client library. |
RRF(Double[])
This system function is used to combine two or more scores provided by other scoring functions. For more information, see https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/rrf. This method is to be used in LINQ expressions only and will be evaluated on server. There's no implementation provided in the client library.
public static double RRF(params double[] scoringFunctions);
static member RRF : double[] -> double
Public Function RRF (ParamArray scoringFunctions As Double()) As Double
Parameters
- scoringFunctions
- Double[]
the scoring functions to combine. Valid functions are FullTextScore and VectorDistance
Returns
Returns the the combined scores of the scoring functions.
Examples
var matched = documents.OrderByRank(document => document.RRF(document.Name.FullTextScore(<keyword1>), document.Address.FullTextScore(<keyword2>)));
Applies to
RRF(Double[], Double[])
This system function is used to combine two or more scores provided by other scoring functions. For more information, see https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/rrf. This method is to be used in LINQ expressions only and will be evaluated on server. There's no implementation provided in the client library.
public static double RRF(double[] scoringFunctions, double[] weights);
static member RRF : double[] * double[] -> double
Public Function RRF (scoringFunctions As Double(), weights As Double()) As Double
Parameters
- scoringFunctions
- Double[]
the scoring functions to combine. Valid functions are FullTextScore and VectorDistance.
- weights
- Double[]
the weights to use for scoring functions
Returns
Returns the the combined scores of the scoring functions.
Examples
var matched = documents.OrderByRank(document => document.RRF(document.Name.FullTextScore(<keyword1>), document.Address.FullTextScore(<keyword2>)));