Class PrefixQuery

All Implemented Interfaces:
Cloneable

public class PrefixQuery extends MultiTermQuery
A Query that matches documents containing terms with a specified prefix. A PrefixQuery is built by QueryParser for input like app*.

This query uses the MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT rewrite method.

  • Constructor Details

    • PrefixQuery

      public PrefixQuery(Term prefix)
      Constructs a query for terms starting with prefix.
  • Method Details