OpsScoreParams is the parameter class passed to the double score(OpsScoreParams params) function. OpenSearch creates and injects an OpsScoreParams object automatically — you reference it directly in your scoring logic without creating one yourself.
Functions
| Function | Description |
|---|---|
OpsDoc getDoc() | Returns an OpsDoc object for reading attribute fields from the current document during scoring. |
OpsRequest getRequest() | Returns an OpsRequest object for reading information from the current search request. |
Function details
OpsDoc getDoc()
Returns an OpsDoc object. Use it to read attribute fields from the current document being scored.
For available fields, see OpsDoc.
OpsRequest getRequest()
Returns an OpsRequest object. Use it to read information from the current search request.
For available properties, see OpsRequest.