Class BaseConstantScoreQueryMapper<T extends SearchQuery>

  • All Implemented Interfaces:
    LuceneQueryMapper<T>
    Direct Known Subclasses:
    AbstractUserQueryMapper

    public abstract class BaseConstantScoreQueryMapper<T extends SearchQuery>
    extends Object
    implements LuceneQueryMapper<T>
    A base LuceneQueryMapper class that produces ConstantScoreQuery, removing any effect of the query from the lucene scoring, this is equivalent of using a LuceneFilter.
    • Constructor Detail

      • BaseConstantScoreQueryMapper

        public BaseConstantScoreQueryMapper()
    • Method Detail

      • internalConvertToLuceneQuery

        protected abstract org.apache.lucene.search.Query internalConvertToLuceneQuery​(T query)
      • convertToLuceneQuery

        public org.apache.lucene.search.Query convertToLuceneQuery​(T searchQuery)
        Description copied from interface: LuceneQueryMapper
        Convert a SearchQuery into a lucene query. So a query that represents a search for any value in a particular index field should map to null.
        Specified by:
        convertToLuceneQuery in interface LuceneQueryMapper<T extends SearchQuery>
        Parameters:
        searchQuery - the query to convert
        Returns:
        the lucene query corresponding to the search query. null can be returned and signifies that no mapped query is necessary for the mapped query.