org.apache.lucene.queries

Class CustomScoreQuery

    • Constructor Detail

      • CustomScoreQuery

        public CustomScoreQuery(Query subQuery)
        Create a CustomScoreQuery over input subQuery.
        Parameters:
        subQuery - the sub query whose scored is being customized. Must not be null.
      • CustomScoreQuery

        public CustomScoreQuery(Query subQuery,
                                FunctionQuery scoringQuery)
        Create a CustomScoreQuery over input subQuery and a FunctionQuery.
        Parameters:
        subQuery - the sub query whose score is being customized. Must not be null.
        scoringQuery - a value source query whose scores are used in the custom score computation. This parameter is optional - it can be null.
      • CustomScoreQuery

        public CustomScoreQuery(Query subQuery,
                                FunctionQuery... scoringQueries)
        Create a CustomScoreQuery over input subQuery and a FunctionQuery.
        Parameters:
        subQuery - the sub query whose score is being customized. Must not be null.
        scoringQueries - value source queries whose scores are used in the custom score computation. This parameter is optional - it can be null or even an empty array.