Class WildcardQuery

    • Constructor Detail

      • WildcardQuery

        public WildcardQuery​(String field,
                             String propName,
                             String pattern,
                             int transform,
                             org.apache.jackrabbit.core.query.lucene.PerQueryCache cache)
        Creates a new WildcardQuery.
        Parameters:
        field - the name of the field to search.
        propName - name of the property to search.
        pattern - the wildcard pattern.
        transform - how property values are transformed before they are matched using the pattern.
      • WildcardQuery

        public WildcardQuery​(String field,
                             String propName,
                             String pattern,
                             org.apache.jackrabbit.core.query.lucene.PerQueryCache cache)
        Creates a new WildcardQuery.
        Parameters:
        field - the name of the field to search.
        propName - name of the property to search.
        pattern - the wildcard pattern.
    • Method Detail

      • rewrite

        public Query rewrite​(IndexReader reader)
                      throws IOException
        Either rewrites this query to a lucene MultiTermQuery or in case of a TooManyClauses exception to a custom jackrabbit query implementation that uses a BitSet to collect all hits.
        Overrides:
        rewrite in class Query
        Parameters:
        reader - the index reader to use for the search.
        Returns:
        the rewritten query.
        Throws:
        IOException - if an error occurs while reading from the index.
      • createWeight

        public Weight createWeight​(Searcher searcher)
        Creates the Weight for this query.
        Overrides:
        createWeight in class Query
        Parameters:
        searcher - the searcher to use for the Weight.
        Returns:
        the Weigth for this query.
      • toString

        public String toString​(String field)
        Returns a string representation of this query.
        Specified by:
        toString in class Query
        Parameters:
        field - the field name for which to create a string representation.
        Returns:
        a string representation of this query.