The DocBoost field expression is used to boost specified documents by their document ids. This field expression is most often used as a score function for boosting the score of specified documents. When multiple document ids are specified, the first document will get the highest boost (1.0), remaining documents will get smaller boost values.
Example:
QueryRequest request = new QueryRequest("*:*)"); request.addScoreFunction( new DocBoost("doc1", "doc2") ); // ... (Perform Search)
REST Syntax:
DOCBOOST(DOCID, ...)
- DOCID - Document ID for document to boost.
Example:
score.function=DOCBOOST("doc1", "doc2")