Common feature classes
Overview
The com.aliyun.opensearch.cava.features package encapsulates the feature libraries and feature functions that are used for the score calculation of a sort plug-in. You can use these feature libraries to perform various operations. For example, you can calculate the relevance of a query term to a category in a document, match query requests with document tags and allocate weights to the tags, or calculate the popularity scores of documents.
Classes
Function classes
Class | Description |
---|---|
Matches search queries in requests with tags in documents. | |
Provides a set of common functionality functions such as decay functions and normalization functions. | |
Returns the score that is calculated by using a basic expression. |
Algorithm classes
Class | Description |
---|---|
Obtains the score that indicates the relevance of a query term to a category in a document. | |
Obtains the popularity score of a document. |
Time-related classes
Class | Description |
---|---|
Provides a set of time-related functions that are used to obtain the current time or the timeliness score of a document. |
Geographic location classes
Class | Description |
---|---|
Calculates the spherical distance between a point in a document and a point in a request. |
Relevance-related feature classes
Overview
The com.aliyun.opensearch.cava.features.similarity package encapsulates the feature classes that are used to calculate text relevance during the score calculation and sorting of a sort plug-in. You can use these feature classes to calculate the text relevance of a query term to a document. In addition to the common feature classes that are related to text relevance, OpenSearch provides the following child packages of the com.aliyun.opensearch.cava.features.similarity package to allow you to perform more operations:
com.aliyun.opensearch.cava.features.similarity.distribution: calculates the distribution of a query term in a field.
com.aliyun.opensearch.cava.features.similarity.fieldmatch: calculates the proximity of a query term to a field.
com.aliyun.opensearch.cava.features.similarity.querymatch: calculates the proximity of a field in a document to an entire query.
Common relevance-related classes
Class | Description |
---|---|
Calculates the text relevance between a query term and a specified field. | |
Calculates the relevance of vector indexs in the query. | |
Calculates a BasicSimilarityScore score, which is mainly used for the IntelligenceAlgorithmScorer class. |
Class | Description |
---|---|
Calculates the proximity of a query term to a specified field. | |
Calculates the ratio of the number of terms that a search query hits in a specific field to the minimum window of the search query in the field. |
Class | Description |
---|---|
Obtains the number of terms after the analysis of a field in an index. | |
Calculates the ratio of terms that a search query hits in a specified field to all terms in the field. | |
Calculates the number of terms that a search query hits in an index. | |
Calculates the proximity of a query term to a specific field. | |
Calculates the BM25 score of a query term based on a specific field. | |
Calculates the text relevance of a query term to multiple specified fields based on the BM25 class. | |
Measures the extent to which the keywords of a search query match a specific field. |
Class | Description |
---|---|
Calculates the ratio of terms that a search query hits in a specific field or all fields of an index to all terms in the index. | |
Calculates the number of query terms after analysis. | |
Calculates the number of terms that a search query hits in an index. |
Algorithm model feature classes
The com.aliyun.opensearch.cava.features.algo package encapsulates the feature class that is used to calculate scores based on a deep learning model. You can use the feature class to calculate the score of document based on a deep learning model.
Class in the com.aliyun.opensearch.cava.features.algo package
Class | Description |
---|---|
AlgoModel | Calculates the score of a document based on a deep learning model. Make sure that you have configured a deep learning model in OpenSearch and the test data of the model has flowed back. The feature class can be used only for the IntelligenceAlgorithmScorer class. |