| Package | Description | 
|---|---|
| org.apache.lucene.document | The logical representation of a  Documentfor indexing and searching. | 
| org.apache.lucene.index | Code to maintain and access indices. | 
| org.apache.lucene.search | Code to search indices. | 
| org.apache.lucene.search.spans | The calculus of spans. | 
| org.apache.lucene.util | Some utility classes. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Query | DoubleRange. newContainsQuery(String field,
                double[] min,
                double[] max)Create a query for matching indexed ranges that contain the defined range. | 
| static Query | FloatRange. newContainsQuery(String field,
                float[] min,
                float[] max)Create a query for matching indexed float ranges that contain the defined range. | 
| static Query | IntRange. newContainsQuery(String field,
                int[] min,
                int[] max)Create a query for matching indexed ranges that contain the defined range. | 
| static Query | LongRange. newContainsQuery(String field,
                long[] min,
                long[] max)Create a query for matching indexed ranges that contain the defined range. | 
| static Query | DoubleRange. newCrossesQuery(String field,
               double[] min,
               double[] max)Create a query for matching indexed ranges that cross the defined range. | 
| static Query | FloatRange. newCrossesQuery(String field,
               float[] min,
               float[] max)Create a query for matching indexed ranges that cross the defined range. | 
| static Query | IntRange. newCrossesQuery(String field,
               int[] min,
               int[] max)Create a query for matching indexed ranges that cross the defined range. | 
| static Query | LongRange. newCrossesQuery(String field,
               long[] min,
               long[] max)Create a query for matching indexed ranges that cross the defined range. | 
| static Query | BinaryPoint. newExactQuery(String field,
             byte[] value)Create a query for matching an exact binary value. | 
| static Query | SortedSetDocValuesField. newExactQuery(String field,
             BytesRef value)Create a query for matching an exact  BytesRefvalue. | 
| static Query | SortedDocValuesField. newExactQuery(String field,
             BytesRef value)Create a query for matching an exact  BytesRefvalue. | 
| static Query | DoublePoint. newExactQuery(String field,
             double value)Create a query for matching an exact double value. | 
| static Query | FloatPoint. newExactQuery(String field,
             float value)Create a query for matching an exact float value. | 
| static Query | IntPoint. newExactQuery(String field,
             int value)Create a query for matching an exact integer value. | 
| static Query | NumericDocValuesField. newExactQuery(String field,
             long value)Create a query for matching an exact long value. | 
| static Query | SortedNumericDocValuesField. newExactQuery(String field,
             long value)Create a query for matching an exact long value. | 
| static Query | LongPoint. newExactQuery(String field,
             long value)Create a query for matching an exact long value. | 
| static Query | DoubleRange. newIntersectsQuery(String field,
                  double[] min,
                  double[] max)Create a query for matching indexed ranges that intersect the defined range. | 
| static Query | FloatRange. newIntersectsQuery(String field,
                  float[] min,
                  float[] max)Create a query for matching indexed ranges that intersect the defined range. | 
| static Query | IntRange. newIntersectsQuery(String field,
                  int[] min,
                  int[] max)Create a query for matching indexed ranges that intersect the defined range. | 
| static Query | LongRange. newIntersectsQuery(String field,
                  long[] min,
                  long[] max)Create a query for matching indexed ranges that intersect the defined range. | 
| static Query | BinaryPoint. newRangeQuery(String field,
             byte[][] lowerValue,
             byte[][] upperValue)Create a range query for n-dimensional binary values. | 
| static Query | BinaryPoint. newRangeQuery(String field,
             byte[] lowerValue,
             byte[] upperValue)Create a range query for binary values. | 
| static Query | SortedSetDocValuesField. newRangeQuery(String field,
             BytesRef lowerValue,
             BytesRef upperValue,
             boolean lowerInclusive,
             boolean upperInclusive)Create a range query that matches all documents whose value is between
  lowerValueandupperValue. | 
| static Query | SortedDocValuesField. newRangeQuery(String field,
             BytesRef lowerValue,
             BytesRef upperValue,
             boolean lowerInclusive,
             boolean upperInclusive)Create a range query that matches all documents whose value is between
  lowerValueandupperValueincluded. | 
| static Query | DoublePoint. newRangeQuery(String field,
             double[] lowerValue,
             double[] upperValue)Create a range query for n-dimensional double values. | 
| static Query | DoublePoint. newRangeQuery(String field,
             double lowerValue,
             double upperValue)Create a range query for double values. | 
| static Query | FloatPoint. newRangeQuery(String field,
             float[] lowerValue,
             float[] upperValue)Create a range query for n-dimensional float values. | 
| static Query | FloatPoint. newRangeQuery(String field,
             float lowerValue,
             float upperValue)Create a range query for float values. | 
| static Query | IntPoint. newRangeQuery(String field,
             int[] lowerValue,
             int[] upperValue)Create a range query for n-dimensional integer values. | 
| static Query | IntPoint. newRangeQuery(String field,
             int lowerValue,
             int upperValue)Create a range query for integer values. | 
| static Query | LongPoint. newRangeQuery(String field,
             long[] lowerValue,
             long[] upperValue)Create a range query for n-dimensional long values. | 
| static Query | NumericDocValuesField. newRangeQuery(String field,
             long lowerValue,
             long upperValue)Create a range query that matches all documents whose value is between
  lowerValueandupperValueincluded. | 
| static Query | SortedNumericDocValuesField. newRangeQuery(String field,
             long lowerValue,
             long upperValue)Create a range query that matches all documents whose value is between
  lowerValueandupperValueincluded. | 
| static Query | LongPoint. newRangeQuery(String field,
             long lowerValue,
             long upperValue)Create a range query for long values. | 
| static Query | BinaryPoint. newSetQuery(String field,
           byte[]... values)Create a query matching any of the specified 1D values. | 
| static Query | DoublePoint. newSetQuery(String field,
           Collection<Double> values)Create a query matching any of the specified 1D values. | 
| static Query | FloatPoint. newSetQuery(String field,
           Collection<Float> values)Create a query matching any of the specified 1D values. | 
| static Query | IntPoint. newSetQuery(String field,
           Collection<Integer> values)Create a query matching any of the specified 1D values. | 
| static Query | LongPoint. newSetQuery(String field,
           Collection<Long> values)Create a query matching any of the specified 1D values. | 
| static Query | DoublePoint. newSetQuery(String field,
           double... values)Create a query matching any of the specified 1D values. | 
| static Query | FloatPoint. newSetQuery(String field,
           float... values)Create a query matching any of the specified 1D values. | 
| static Query | IntPoint. newSetQuery(String field,
           int... values)Create a query matching any of the specified 1D values. | 
| static Query | LongPoint. newSetQuery(String field,
           long... values)Create a query matching any of the specified 1D values. | 
| static Query | DoubleRange. newWithinQuery(String field,
              double[] min,
              double[] max)Create a query for matching indexed ranges that are within the defined range. | 
| static Query | FloatRange. newWithinQuery(String field,
              float[] min,
              float[] max)Create a query for matching indexed ranges that are within the defined range. | 
| static Query | IntRange. newWithinQuery(String field,
              int[] min,
              int[] max)Create a query for matching indexed ranges that are within the defined range. | 
| static Query | LongRange. newWithinQuery(String field,
              long[] min,
              long[] max)Create a query for matching indexed ranges that are within the defined range. | 
| Modifier and Type | Method and Description | 
|---|---|
| long | IndexWriter. deleteDocuments(Query... queries)Deletes the document(s) matching any of the provided queries. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | AutomatonQueryA  Querythat will match terms against a finite-state machine. | 
| class  | BlendedTermQueryA  Querythat blends index statistics across multiple terms. | 
| class  | BooleanQueryA Query that matches documents matching boolean combinations of other
 queries, e.g. | 
| class  | BoostQueryA  Querywrapper that allows to give a boost to the wrapped query. | 
| class  | ConstantScoreQueryA query that wraps another query and simply returns a constant score equal to
 1 for every document that matches the query. | 
| class  | DisjunctionMaxQueryA query that generates the union of documents produced by its subqueries, and that scores each document with the maximum
 score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries. | 
| class  | FieldValueQueryA  Querythat matches documents that have a value for a given field
 as reported byLeafReader.getDocsWithField(String). | 
| class  | FuzzyQueryImplements the fuzzy search query. | 
| class  | IndexOrDocValuesQueryA query that uses either an index structure (points or terms) or doc values
 in order to run a query, depending which one is more efficient. | 
| class  | LegacyNumericRangeQuery<T extends Number>Deprecated. 
 Instead index with  IntPoint,LongPoint,FloatPoint,DoublePoint, and
             create range queries withIntPoint.newRangeQuery(),LongPoint.newRangeQuery(),FloatPoint.newRangeQuery(),DoublePoint.newRangeQuery()respectively.
             SeePointValuesfor background information on Points. | 
| class  | MatchAllDocsQueryA query that matches all documents. | 
| class  | MatchNoDocsQueryA query that matches no documents. | 
| class  | MultiPhraseQueryA generalized version of  PhraseQuery, with the possibility of
 adding more than one term at the same position that are treated as a disjunction (OR). | 
| class  | MultiTermQueryAn abstract  Querythat matches documents
 containing a subset of terms provided by aFilteredTermsEnumenumeration. | 
| class  | NGramPhraseQueryThis is a  PhraseQuerywhich is optimized for n-gram phrase query. | 
| class  | PhraseQueryA Query that matches documents containing a particular sequence of terms. | 
| class  | PointInSetQueryAbstract query class to find all documents whose single or multi-dimensional point values, previously indexed with e.g. | 
| class  | PointRangeQueryAbstract class for range queries against single or multidimensional points such as
  IntPoint. | 
| class  | PrefixQueryA Query that matches documents containing terms with a specified prefix. | 
| class  | RegexpQueryA fast regular expression query based on the
  org.apache.lucene.util.automatonpackage. | 
| class  | SynonymQueryA query that treats multiple terms as synonyms. | 
| class  | TermInSetQuerySpecialization for a disjunction over many terms that behaves like a
  ConstantScoreQueryover aBooleanQuerycontaining onlyBooleanClause.Occur.SHOULDclauses. | 
| class  | TermQueryA Query that matches documents containing a term. | 
| class  | TermRangeQueryA Query that matches documents within an range of terms. | 
| class  | WildcardQueryImplements the wildcard search query. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected Query | Weight. parentQuery | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Query | MultiTermQuery.TopTermsBlendedFreqScoringRewrite. build(BlendedTermQuery.Builder builder) | 
| protected Query | MultiTermQuery.TopTermsScoringBooleanQueryRewrite. build(BooleanQuery.Builder builder) | 
| protected Query | MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite. build(BooleanQuery.Builder builder) | 
| Query | IndexOrDocValuesQuery. getIndexQuery()Return the wrapped query that may be costly to initialize but has a good
  iterator. | 
| Query | BooleanClause. getQuery() | 
| Query | BoostQuery. getQuery()Return the wrapped  Query. | 
| Query | ConstantScoreQuery. getQuery()Returns the encapsulated query. | 
| Query | Weight. getQuery()The query that this concerns. | 
| Query | IndexOrDocValuesQuery. getRandomAccessQuery()Return the wrapped query that may be slow at identifying all matching
  documents, but which is cheap to initialize and can efficiently
  verify that some documents match. | 
| Query | MultiTermQuery. rewrite(IndexReader reader)To rewrite to a simpler form, instead return a simpler
 enum from  MultiTermQuery.getTermsEnum(Terms, AttributeSource). | 
| Query | PhraseQuery. rewrite(IndexReader reader) | 
| Query | BlendedTermQuery. rewrite(IndexReader reader) | 
| Query | BooleanQuery. rewrite(IndexReader reader) | 
| Query | DisjunctionMaxQuery. rewrite(IndexReader reader)Optimize our representation and our subqueries representations | 
| Query | BoostQuery. rewrite(IndexReader reader) | 
| Query | SynonymQuery. rewrite(IndexReader reader) | 
| Query | ConstantScoreQuery. rewrite(IndexReader reader) | 
| Query | TermInSetQuery. rewrite(IndexReader reader) | 
| Query | IndexOrDocValuesQuery. rewrite(IndexReader reader) | 
| Query | MultiPhraseQuery. rewrite(IndexReader reader) | 
| Query | NGramPhraseQuery. rewrite(IndexReader reader) | 
| Query | Query. rewrite(IndexReader reader)Expert: called to re-write queries into primitive queries. | 
| abstract Query | MultiTermQuery.RewriteMethod. rewrite(IndexReader reader,
       MultiTermQuery query) | 
| Query | ScoringRewrite. rewrite(IndexReader reader,
       MultiTermQuery query) | 
| Query | DocValuesRewriteMethod. rewrite(IndexReader reader,
       MultiTermQuery query) | 
| Query | TopTermsRewrite. rewrite(IndexReader reader,
       MultiTermQuery query) | 
| Query | IndexSearcher. rewrite(Query original)Expert: called to re-write queries into primitive queries. | 
| abstract Query | BlendedTermQuery.RewriteMethod. rewrite(Query[] subQueries)Merge the provided sub queries into a single  Queryobject. | 
| Query | BlendedTermQuery.DisjunctionMaxRewrite. rewrite(Query[] subQueries) | 
| Modifier and Type | Method and Description | 
|---|---|
| List<Query> | DisjunctionMaxQuery. getDisjuncts() | 
| Iterator<Query> | DisjunctionMaxQuery. iterator() | 
| Modifier and Type | Method and Description | 
|---|---|
| BooleanQuery.Builder | BooleanQuery.Builder. add(Query query,
   BooleanClause.Occur occur)Add a new clause to this  BooleanQuery.Builder. | 
| void | LRUQueryCache. clearQuery(Query query)Remove all cache entries for the given query. | 
| int | IndexSearcher. count(Query query)Count how many documents match the given query. | 
| Weight | IndexSearcher. createNormalizedWeight(Query query,
                      boolean needsScores)Creates a normalized weight for a top-level  Query. | 
| Weight | IndexSearcher. createWeight(Query query,
            boolean needsScores)Creates a  Weightfor the given query, potentially adding caching
 if possible and configured. | 
| Explanation | IndexSearcher. explain(Query query,
       int doc)Returns an Explanation that describes how  docscored againstquery. | 
| protected int | UsageTrackingQueryCachingPolicy. minFrequencyToCache(Query query)For a given filter, return how many times it should appear in the history
 before being cached. | 
| protected void | LRUQueryCache. onHit(Object readerCoreKey,
     Query query)Expert: callback when there is a cache hit on a given query. | 
| protected void | LRUQueryCache. onMiss(Object readerCoreKey,
      Query query)Expert: callback when there is a cache miss on a given query. | 
| protected void | LRUQueryCache. onQueryCache(Query query,
            long ramBytesUsed)Expert: callback when a query is added to this cache. | 
| protected void | LRUQueryCache. onQueryEviction(Query query,
               long ramBytesUsed)Expert: callback when a query is evicted from this cache. | 
| void | QueryCachingPolicy. onUse(Query query)Callback that is called every time that a cached filter is used. | 
| void | UsageTrackingQueryCachingPolicy. onUse(Query query) | 
| protected long | LRUQueryCache. ramBytesUsed(Query query)Return the number of bytes used by the given query. | 
| static TopDocs | QueryRescorer. rescore(IndexSearcher searcher,
       TopDocs topDocs,
       Query query,
       double weight,
       int topN)Sugar API, calling {#rescore} using a simple linear
  combination of firstPassScore + weight * secondPassScore | 
| Query | IndexSearcher. rewrite(Query original)Expert: called to re-write queries into primitive queries. | 
| abstract Query | BlendedTermQuery.RewriteMethod. rewrite(Query[] subQueries)Merge the provided sub queries into a single  Queryobject. | 
| Query | BlendedTermQuery.DisjunctionMaxRewrite. rewrite(Query[] subQueries) | 
| void | IndexSearcher. search(Query query,
      Collector results)Lower-level search API. | 
| <C extends Collector,T> | IndexSearcher. search(Query query,
      CollectorManager<C,T> collectorManager)Lower-level search API. | 
| TopDocs | IndexSearcher. search(Query query,
      int n)Finds the top  nhits forquery. | 
| TopFieldDocs | IndexSearcher. search(Query query,
      int n,
      Sort sort)Search implementation with arbitrary sorting. | 
| TopFieldDocs | IndexSearcher. search(Query query,
      int n,
      Sort sort,
      boolean doDocScores,
      boolean doMaxScore)Search implementation with arbitrary sorting, plus
 control over whether hit scores and max score
 should be computed. | 
| TopDocs | IndexSearcher. searchAfter(ScoreDoc after,
           Query query,
           int numHits)Finds the top  nhits forquerywhere all results are after a previous 
 result (after). | 
| TopDocs | IndexSearcher. searchAfter(ScoreDoc after,
           Query query,
           int n,
           Sort sort)Finds the top  nhits forquerywhere all results are after a previous
 result (after). | 
| TopFieldDocs | IndexSearcher. searchAfter(ScoreDoc after,
           Query query,
           int numHits,
           Sort sort,
           boolean doDocScores,
           boolean doMaxScore)Finds the top  nhits forquerywhere all results are after a previous
 result (after), allowing control over
 whether hit scores and max score should be computed. | 
| boolean | QueryCachingPolicy. shouldCache(Query query)Whether the given  Queryis worth caching. | 
| boolean | UsageTrackingQueryCachingPolicy. shouldCache(Query query) | 
| Constructor and Description | 
|---|
| BooleanClause(Query query,
             BooleanClause.Occur occur)Constructs a BooleanClause. | 
| BoostQuery(Query query,
          float boost)Sole constructor: wrap  queryin such a way that the produced
  scores will be boosted byboost. | 
| ConstantScoreQuery(Query query)Strips off scores from the passed in Query. | 
| ConstantScoreWeight(Query query) | 
| FilterWeight(Query query,
            Weight weight)Alternative constructor. | 
| IndexOrDocValuesQuery(Query indexQuery,
                     Query dvQuery)Create an  IndexOrDocValuesQuery. | 
| QueryRescorer(Query query)Sole constructor, passing the 2nd pass query to
  assign scores to the 1st pass hits. | 
| RandomAccessWeight(Query query)Sole constructor. | 
| Weight(Query query)Sole constructor, typically invoked by sub-classes. | 
| Constructor and Description | 
|---|
| DisjunctionMaxQuery(Collection<Query> disjuncts,
                   float tieBreakerMultiplier)Creates a new DisjunctionMaxQuery | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | FieldMaskingSpanQueryWrapper to allow  SpanQueryobjects participate in composite 
 single-field SpanQueries by 'lying' about their search field. | 
| class  | SpanBoostQueryCounterpart of  BoostQueryfor spans. | 
| class  | SpanContainingQueryKeep matches that contain another SpanScorer. | 
| class  | SpanFirstQueryMatches spans near the beginning of a field. | 
| class  | SpanMultiTermQueryWrapper<Q extends MultiTermQuery>Wraps any  MultiTermQueryas aSpanQuery, 
 so it can be nested within other SpanQuery classes. | 
| class  | SpanNearQueryMatches spans which are near one another. | 
| class  | SpanNotQueryRemoves matches which overlap with another SpanQuery or which are
 within x tokens before or y tokens after another SpanQuery. | 
| class  | SpanOrQueryMatches the union of its clauses. | 
| class  | SpanPositionCheckQueryBase class for filtering a SpanQuery based on the position of a match. | 
| class  | SpanPositionRangeQueryChecks to see if the  SpanPositionCheckQuery.getMatch()lies between a start and end position
 SeeSpanFirstQueryfor a derivation that is optimized for the case where start position is 0. | 
| class  | SpanQueryBase class for span-based queries. | 
| class  | SpanTermQueryMatches spans containing a term. | 
| class  | SpanWithinQueryKeep matches that are contained within another Spans. | 
| Modifier and Type | Method and Description | 
|---|---|
| Query | SpanMultiTermQueryWrapper. getWrappedQuery()Returns the wrapped query | 
| Query | SpanNotQuery. rewrite(IndexReader reader) | 
| Query | SpanBoostQuery. rewrite(IndexReader reader) | 
| Query | FieldMaskingSpanQuery. rewrite(IndexReader reader) | 
| Query | SpanNearQuery. rewrite(IndexReader reader) | 
| Query | SpanPositionCheckQuery. rewrite(IndexReader reader) | 
| Query | SpanOrQuery. rewrite(IndexReader reader) | 
| Query | SpanMultiTermQueryWrapper. rewrite(IndexReader reader) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Query | QueryBuilder. analyzeBoolean(String field,
              TokenStream stream)Creates simple boolean query from the cached tokenstream contents | 
| protected Query | QueryBuilder. analyzeGraphBoolean(String field,
                   TokenStream source,
                   BooleanClause.Occur operator)Creates a boolean query from a graph token stream. | 
| protected Query | QueryBuilder. analyzeMultiBoolean(String field,
                   TokenStream stream,
                   BooleanClause.Occur operator)Creates complex boolean query from the cached tokenstream contents | 
| protected Query | QueryBuilder. analyzeMultiPhrase(String field,
                  TokenStream stream,
                  int slop)Creates complex phrase query from the cached tokenstream contents | 
| protected Query | QueryBuilder. analyzePhrase(String field,
             TokenStream stream,
             int slop)Creates simple phrase query from the cached tokenstream contents | 
| protected Query | QueryBuilder. analyzeTerm(String field,
           TokenStream stream)Creates simple term query from the cached tokenstream contents | 
| Query | QueryBuilder. createBooleanQuery(String field,
                  String queryText)Creates a boolean query from the query text. | 
| Query | QueryBuilder. createBooleanQuery(String field,
                  String queryText,
                  BooleanClause.Occur operator)Creates a boolean query from the query text. | 
| protected Query | QueryBuilder. createFieldQuery(Analyzer analyzer,
                BooleanClause.Occur operator,
                String field,
                String queryText,
                boolean quoted,
                int phraseSlop)Creates a query from the analysis chain. | 
| protected Query | QueryBuilder. createFieldQuery(TokenStream source,
                BooleanClause.Occur operator,
                String field,
                boolean quoted,
                int phraseSlop)Creates a query from a token stream. | 
| Query | QueryBuilder. createMinShouldMatchQuery(String field,
                         String queryText,
                         float fraction)Creates a minimum-should-match query from the query text. | 
| Query | QueryBuilder. createPhraseQuery(String field,
                 String queryText)Creates a phrase query from the query text. | 
| Query | QueryBuilder. createPhraseQuery(String field,
                 String queryText,
                 int phraseSlop)Creates a phrase query from the query text. | 
| protected Query | QueryBuilder. newGraphSynonymQuery(Iterator<Query> queries)Builds a new GraphQuery for multi-terms synonyms. | 
| protected Query | QueryBuilder. newSynonymQuery(Term[] terms)Builds a new SynonymQuery instance. | 
| protected Query | QueryBuilder. newTermQuery(Term term)Builds a new TermQuery instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Query | QueryBuilder. newGraphSynonymQuery(Iterator<Query> queries)Builds a new GraphQuery for multi-terms synonyms. | 
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.