Class Reference
IRIS for UNIX 2024.1.2
|
|
Private
Storage
|
This is the abstract superclass for all ranking algorithm implementations. In order to
provide a rank or score for one or more records, an instance of this class is created and
initialized with the search string and options. As part of this initialization, the search
string will be parsed in the same way as it's done for the search operation itself and the
resulting search tree is stored in the
Implementation-specific setup can be carried out by overriding the
Then, the
These scores are then aggregated by taking the minimum value when nodes are ANDed and the
maximum value when nodes are ORed, producing an overall score for the record, which can finally
be amended through the
Subclasses should typically only override / implement the
|
|
Properties | ||||
---|---|---|---|---|
ClassName | IndexName | IndexParams | IndexType | ParsedQuery |
SearchArgs | SearchOption | SearchString |
Subclasses |
---|
|
Defines how weight scores of different subnodes of an AND node in the search tree are combined by the
GetNodeScore method to provide an aggregated weight for the total. SeeOPERATORLOGICOR for a list of options.
Defines how weight scores of different subnodes of an OR node in the search tree are combined by the
GetNodeScore method to provide an aggregated weight for the total. The different values are:
- MAX: the highest weight of any sub-node is used as the weight of this composite node
- MIN: the smallest weight of any sub-node is used as the weight of this composite node
- SUM: the sum of all sub-node's weights is used as the weight of this composite node
- AVG: the average of all sub-node's weights is used as the weight of this composite node
|
Name of the class based on which' index records should be ranked
The index based on which records should be ranked
An array containing all the index parameters ofIndexName
The index class ofIndexName
The entire parsed query tree.ParsedQuery([node ID], "o") = [operator: A|O|N] ParsedQuery([node ID], "p") = [parent node ID] ParsedQuery([node ID], "ch", [child node ID]) = [child node is negated] ParsedQuery([node ID], "s") = n ParsedQuery([node ID], "s", [leaf ID]) = [atomic string] ParsedQuery([node ID], "s", [leaf ID], "n") = [atomic string is negated] ParsedQuery([node ID], "s", [leaf ID], 1) = [left operator] ParsedQuery([node ID], "s", [leaf ID], 2) = [right operator]
Any additional search option arguments the ranker was initialized with. For example, whenSearchOption = $$$IFSEARCHFUZZY, this property may contain the requested maximum edit distance.
The primary search option this ranker is initialized with (defaults to $$$IFSEARCHNORMAL)
The full search string this ranker was initialized with.
|
This method calculates the overall score for the given search string for one specific record by invoking
GetNodeScore on the top-level node of the parsed search string. The resulting score can still be amended byOnGetRecordScore , order dto apply any record-level modifiers.This method will also invoke the callback methods
OnBeforeGetRecordScore andOnAfterGetRecordScore , which can be used to retrieve and clean up any record- related information required for theGetLeafScore implementation.
OnBeforeGetRecordScore implemenations may return a skip flag, instructing this code to skip the calls toGetNodeScore for this record.
This method initializes this ranker object for the given task, retrieving index metadata and parsing the search string