Uses of Package
org.apache.lucene.search
Packages that use org.apache.lucene.search
Package
Description
Codecs API: API for customization of the encoding and structure of the index.
HNSW vector helper classes.
Lucene 9.0 file format.
Lucene 9.5 file format.
Lucene 9.9 file format.
Postings format that can delegate to different formats per-field.
The logical representation of a
Document
for indexing and
searching.Code to maintain and access indices.
Code to search indices.
Comparators, used to compare hits so as to determine their sort order when collecting the top
results with
TopFieldCollector
.Classes related to vector search: knn and vector fields.
This package contains the various ranking models that can be used in Lucene.
Some utility classes.
Finite-state automaton for regular expressions.
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.
Provides quantization methods for scaling vector values to smaller data types and possibly fewer
dimensions
-
Classes in org.apache.lucene.search used by org.apache.lucene.codecsClassDescriptionKnnCollector is a knn collector used for gathering kNN results and providing topDocs from the gathered neighbors
-
Classes in org.apache.lucene.search used by org.apache.lucene.codecs.hnswClassDescriptionKnnCollector is a knn collector used for gathering kNN results and providing topDocs from the gathered neighbors
-
Classes in org.apache.lucene.search used by org.apache.lucene.codecs.lucene90ClassDescriptionThis abstract class defines methods to iterate over a set of non-decreasing doc ids.
-
Classes in org.apache.lucene.search used by org.apache.lucene.codecs.lucene95ClassDescriptionComputes the similarity score between a given query vector and different document vectors.
-
Classes in org.apache.lucene.search used by org.apache.lucene.codecs.lucene99ClassDescriptionKnnCollector is a knn collector used for gathering kNN results and providing topDocs from the gathered neighborsExecutor wrapper responsible for the execution of concurrent tasks.Computes the similarity score between a given query vector and different document vectors.
-
Classes in org.apache.lucene.search used by org.apache.lucene.codecs.perfieldClassDescriptionKnnCollector is a knn collector used for gathering kNN results and providing topDocs from the gathered neighbors
-
Classes in org.apache.lucene.search used by org.apache.lucene.documentClassDescriptionThis abstract class defines methods to iterate over a set of non-decreasing doc ids.Base class for producing
DoubleValues
Implements search over a single IndexReader.The abstract base class for queries.Allows recursion through a query treeDifferent modes of search.Type of selection to perform.Type of selection to perform.Stores information about how to sort documents by terms in an individual field.Represents hits returned byIndexSearcher.search(Query,int,Sort)
.Expert: Calculate query weights and build query scorers. -
Classes in org.apache.lucene.search used by org.apache.lucene.indexClassDescriptionA DocIdSet contains a set of doc ids.This abstract class defines methods to iterate over a set of non-decreasing doc ids.Implements search over a single IndexReader.KnnCollector is a knn collector used for gathering kNN results and providing topDocs from the gathered neighborsThe abstract base class for queries.Utility class to safely share instances of a certain type across multiple threads, while periodically refreshing them.Encapsulates sort criteria for returned hits.Stores information about how to sort documents by terms in an individual field.Represents hits returned by
IndexSearcher.search(Query,int)
.Computes the similarity score between a given query vector and different document vectors. -
Classes in org.apache.lucene.search used by org.apache.lucene.searchClassDescriptionAbstractKnnCollector is the default implementation for a knn collector used for gathering kNN results and providing topDocs from the gathered neighborsA
Query
that will match terms against a finite-state machine.AQuery
that blends index statistics across multiple terms.A Builder forBlendedTermQuery
.ABlendedTermQuery.RewriteMethod
defines how queries for individual terms should be merged.A clause in a BooleanQuery.Specifies how clauses are to occur in matching documents.A Query that matches documents matching boolean combinations of other queries, e.g.A builder for boolean queries.Add thisAttribute
to aTermsEnum
returned byMultiTermQuery.getTermsEnum(Terms,AttributeSource)
and update the boost on each returned term.This class is used to score a range of documents at once, and is returned byWeight.bulkScorer(org.apache.lucene.index.LeafReaderContext)
.Caches all docs, and optionally also scores, coming from a search, and is then able to replay them to another collector.LikeIntConsumer
, but may throw checked exceptions.Contains statistics for a collection (field).Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.A manager of collectors.AQuery
that treats multiple fields as a single stream and scores terms as if they had been indexed in a single field whose values would be the union of the values of the provided fields.A builder forCombinedFieldQuery
.Specialization ofScorerSupplier
for queries that produce constant scores.A priority queue of DocIdSetIterators that orders by current doc ID.Wrapper used inDisiPriorityQueue
.ADocIdSetIterator
which is a disjunction of the approximations of the provided iterators.A DocIdSet contains a set of doc ids.This abstract class defines methods to iterate over a set of non-decreasing doc ids.A stream of doc IDs.Per-segment, per-document double values, which can be calculated at search-timeBase class for producingDoubleValues
Expert: Describes the score computation for document and query.Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top results withTopFieldCollector
.Provides aFieldComparator
for custom field sorting.Expert: A ScoreDoc which also contains information about how to sort the referenced document.Expert: A hit queue for sorting by hits by terms in more than one field.Extension of ScoreDoc to also store theFieldComparator
slot.Collector
delegator.Implements search over a single IndexReader.Holds information about a specific leaf context and the corresponding range of doc ids to search within.A class holding a subset of theIndexSearcher
s leaf contexts to be executed within a single thread.Thrown when an attempt is made to add more thanIndexSearcher.TooManyClauses.getMaxClauseCount()
clauses.A Query that matches documents matching combinations of subqueries.The Indri implemenation of a disjunction scorer which stores the subscorers for the child queries.A Basic abstract query that all IndriQueries can extend to implement toString, equals, getClauses, and iterator.The Indri parent scorer that stores the boost so that IndriScorers can use the boost outside of the term.UsesKnnVectorsReader.search(String, byte[], KnnCollector, Bits)
to perform nearest neighbour search.KnnCollector is a knn collector used for gathering kNN results and providing topDocs from the gathered neighborsKnnCollector.Decorator is the base class for decorators of KnnCollector objects, which extend the object with new behaviors.UsesKnnVectorsReader.search(String, float[], KnnCollector, Bits)
to perform nearest neighbour search.Collector decouples the score from the collected doc: the score computation is skipped entirely if it's not needed.Expert: comparator that gets instantiated on each leaf from a top-levelFieldComparator
instance.Per-segment, per-document long values, which can be calculated at search-timeBase class for producingLongValues
Cache of doc ids with a count.Reports the positions and optionally offsets of all matching terms in a query for a single documentAn iterator over match positions (and optionally offsets) for a single document and fieldAdd thisAttribute
to a freshAttributeSource
before callingMultiTermQuery.getTermsEnum(Terms,AttributeSource)
.Compute maximum scores based onImpacts
and keep them in a cache in order not to run expensive similarity score computations multiple times on the same data.A generalized version ofPhraseQuery
, with the possibility of adding more than one term at the same position that are treated as a disjunction (OR).A builder for multi-phrase queriesTakes the logical union of multiple PostingsEnum iterators.An abstractQuery
that matches documents containing a subset of terms provided by aFilteredTermsEnum
enumeration.Abstract class that defines how the query is rewritten.Utility class to help extract the set of sub queries that have matched from a larger query.This is a version of knn vector query that exits early when HNSW queue saturates over a#saturationThreshold
for more than#patience
times.Base class for exact and sloppy phrase matchingA Query that matches documents containing a particular sequence of terms.A builder for phrase queries.Term postings and position information for phrase matchingIterator of encoded point values.ControlsLeafFieldComparator
how to skip documentsThe abstract base class for queries.A cache for queries.A policy defining which filters should be cached.Allows recursion through a query treeUtility class to safely share instances of a certain type across multiple threads, while periodically refreshing them.Use to receive notification when a refresh has finished.Re-scores the topN results (TopDocs
) from an original query.Allows access to the score of a QueryA child Scorer and its relationship to its parent.Holds one hit inTopDocs
.Different modes of search.Expert: Common scoring functionality for different types of queries.A supplier ofScorer
.Base rewrite method that translates each term into a query, and keeps the scores as computed by the query.Factory class used bySearcherManager
to create new IndexSearchers.This is a version of knn vector query that provides a query seed to initiate the vector search.Interface defining whether or not an object can be cached against aLeafReader
Encapsulates sort criteria for returned hits.Type of selection to perform.Type of selection to perform.Stores information about how to sort documents by terms in an individual field.Specifies the type of the terms to be sorted, or special types such as CUSTOMA query that treats multiple terms as synonyms.A builder forSynonymQuery
.Executor wrapper responsible for the execution of concurrent tasks.A Query that matches documents within an range of terms.Contains statistics for a specific termRepresents hits returned byIndexSearcher.search(Query,int)
.A base class for all collectors that return aTopDocs
output.Represents hits returned byIndexSearcher.search(Query,int,Sort)
.Base rewrite method for collecting only the top terms via a priority queue.Just counts the total number of hits.Description of the total number of hits of a query.How theTotalHits.value
should be interpreted.Returned byScorer.twoPhaseIterator()
to expose an approximation of aDocIdSetIterator
.Expert: Calculate query weights and build query scorers. -
Classes in org.apache.lucene.search used by org.apache.lucene.search.comparatorsClassDescriptionThis abstract class defines methods to iterate over a set of non-decreasing doc ids.Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top results with
TopFieldCollector
.Expert: comparator that gets instantiated on each leaf from a top-levelFieldComparator
instance.ControlsLeafFieldComparator
how to skip documentsAllows access to the score of a Query -
Classes in org.apache.lucene.search used by org.apache.lucene.search.knnClassDescriptionAbstractKnnCollector is the default implementation for a knn collector used for gathering kNN results and providing topDocs from the gathered neighborsThis abstract class defines methods to iterate over a set of non-decreasing doc ids.A
KnnCollector.Decorator
that early exits when nearest neighbor queue keeps saturating beyond a 'patience' parameter.Implements search over a single IndexReader.KnnCollector is a knn collector used for gathering kNN results and providing topDocs from the gathered neighborsKnnCollector.Decorator is the base class for decorators of KnnCollector objects, which extend the object with new behaviors. -
Classes in org.apache.lucene.search used by org.apache.lucene.search.similaritiesClassDescriptionContains statistics for a collection (field).Expert: Describes the score computation for document and query.Contains statistics for a specific term
-
Classes in org.apache.lucene.search used by org.apache.lucene.utilClassDescriptionSpecifies how clauses are to occur in matching documents.A builder for boolean queries.Like
IntConsumer
, but may throw checked exceptions.A DocIdSet contains a set of doc ids.This abstract class defines methods to iterate over a set of non-decreasing doc ids.A builder for multi-phrase queriesThe abstract base class for queries. -
Classes in org.apache.lucene.search used by org.apache.lucene.util.automatonClassDescriptionThe abstract base class for queries.Allows recursion through a query tree
-
Classes in org.apache.lucene.search used by org.apache.lucene.util.hnswClassDescriptionKnnCollector is a knn collector used for gathering kNN results and providing topDocs from the gathered neighborsKnnCollector.Decorator is the base class for decorators of KnnCollector objects, which extend the object with new behaviors.Executor wrapper responsible for the execution of concurrent tasks.Represents hits returned by
IndexSearcher.search(Query,int)
. -
Classes in org.apache.lucene.search used by org.apache.lucene.util.quantizationClassDescriptionComputes the similarity score between a given query vector and different document vectors.