Package | Description |
---|---|
org.apache.lucene.index |
Code to maintain and access indices.
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.grouping |
Grouping.
|
Modifier and Type | Field and Description |
---|---|
protected Sort |
LiveIndexWriterConfig.indexSort
The sort order to use to write merged segments.
|
private Sort |
SegmentInfo.indexSort |
private Sort |
LeafMetaData.sort |
(package private) Sort |
Sorter.sort |
Modifier and Type | Method and Description |
---|---|
Sort |
LiveIndexWriterConfig.getIndexSort()
Get the index-time
Sort order, applied to all (flushed and merged) segments. |
Sort |
SegmentInfo.getIndexSort()
Return the sort order of this segment, or null if the index has no sort.
|
Sort |
LeafMetaData.getSort()
Return the order in which documents from this index are sorted, or
null if documents are in no particular order. |
Modifier and Type | Method and Description |
---|---|
private MergeState.DocMap[] |
MergeState.buildDocMaps(java.util.List<CodecReader> readers,
Sort indexSort) |
(package private) static boolean |
IndexWriter.isCongruentSort(Sort indexSort,
Sort otherSort)
Returns true if
indexSort is a prefix of otherSort . |
IndexWriterConfig |
IndexWriterConfig.setIndexSort(Sort sort)
Set the
Sort order to use for all (flushed and merged) segments. |
(package private) static MergeState.DocMap[] |
MultiSorter.sort(Sort sort,
java.util.List<CodecReader> readers)
Does a merge sort of the leaves of the incoming reader, returning
MergeState.DocMap to map each leaf's
documents into the merged segment. |
static CheckIndex.Status.IndexSortStatus |
CheckIndex.testSort(CodecReader reader,
Sort sort,
java.io.PrintStream infoStream,
boolean failFast)
Tests index sort order.
|
private void |
DefaultIndexingChain.validateIndexSortDVType(Sort indexSort,
java.lang.String fieldName,
DocValuesType dvType) |
static LeafReader |
SortingLeafReader.wrap(LeafReader reader,
Sort sort)
Return a sorted view of
reader according to the order
defined by sort . |
Constructor and Description |
---|
LeafMetaData(int createdVersionMajor,
Version minVersion,
Sort sort)
Expert: Sole constructor.
|
SegmentInfo(Directory dir,
Version version,
Version minVersion,
java.lang.String name,
int maxDoc,
boolean isCompoundFile,
Codec codec,
java.util.Map<java.lang.String,java.lang.String> diagnostics,
byte[] id,
java.util.Map<java.lang.String,java.lang.String> attributes,
Sort indexSort)
Construct a new complete SegmentInfo instance from input.
|
Sorter(Sort sort)
Creates a new Sorter to sort the index with
sort |
Modifier and Type | Field and Description |
---|---|
static Sort |
Sort.INDEXORDER
Represents sorting by index order.
|
static Sort |
Sort.RELEVANCE
Represents sorting by computed relevance.
|
private Sort |
SortRescorer.sort |
(package private) Sort |
TopFieldCollector.SimpleFieldCollector.sort |
(package private) Sort |
TopFieldCollector.PagingFieldCollector.sort |
Modifier and Type | Method and Description |
---|---|
Sort |
Sort.rewrite(IndexSearcher searcher)
Rewrites the SortFields in this Sort, returning a new Sort if any of the fields
changes during their rewriting.
|
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
TopFieldCollector.canEarlyTerminate(Sort searchSort,
Sort indexSort) |
private static boolean |
TopFieldCollector.canEarlyTerminateOnDocId(Sort searchSort) |
private static boolean |
TopFieldCollector.canEarlyTerminateOnPrefix(Sort searchSort,
Sort indexSort) |
static TopFieldCollector |
TopFieldCollector.create(Sort sort,
int numHits,
FieldDoc after,
int totalHitsThreshold)
Creates a new
TopFieldCollector from the given
arguments. |
static TopFieldCollector |
TopFieldCollector.create(Sort sort,
int numHits,
int totalHitsThreshold)
Creates a new
TopFieldCollector from the given
arguments. |
static TopFieldDocs |
TopDocs.merge(Sort sort,
int start,
int topN,
TopFieldDocs[] shardHits,
boolean setShardIndex)
Same as
TopDocs.merge(Sort, int, TopFieldDocs[]) but also ignores the top
start top docs. |
static TopFieldDocs |
TopDocs.merge(Sort sort,
int topN,
TopFieldDocs[] shardHits)
Returns a new TopFieldDocs, containing topN results across
the provided TopFieldDocs, sorting by the specified
Sort . |
private static TopDocs |
TopDocs.mergeAux(Sort sort,
int start,
int size,
TopDocs[] shardHits,
boolean setShardIndex)
Auxiliary method used by the
TopDocs.merge(int, org.apache.lucene.search.TopDocs[]) impls. |
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)
Search implementation with arbitrary sorting, plus
control over whether hit scores and max score
should be computed.
|
private TopFieldDocs |
IndexSearcher.searchAfter(FieldDoc after,
Query query,
int numHits,
Sort sort,
boolean doDocScores) |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int n,
Sort sort)
Finds the top
n
hits for query where all results are after a previous
result (after ). |
TopFieldDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int numHits,
Sort sort,
boolean doDocScores)
Finds the top
n
hits for query where all results are after a previous
result (after ), allowing control over
whether hit scores and max score should be computed. |
Constructor and Description |
---|
MergeSortQueue(Sort sort,
TopDocs[] shardHits) |
PagingFieldCollector(Sort sort,
FieldValueHitQueue<FieldValueHitQueue.Entry> queue,
FieldDoc after,
int numHits,
int totalHitsThreshold) |
SimpleFieldCollector(Sort sort,
FieldValueHitQueue<FieldValueHitQueue.Entry> queue,
int numHits,
int totalHitsThreshold) |
SortRescorer(Sort sort)
Sole constructor.
|
Modifier and Type | Field and Description |
---|---|
private Sort |
GroupingSearch.groupSort |
private Sort |
TopGroupsCollector.groupSort |
private Sort |
BlockGroupingCollector.groupSort |
protected Sort |
AllGroupHeadsCollector.sort |
private Sort |
GroupingSearch.sortWithinGroup |
private Sort |
TopGroupsCollector.withinGroupSort |
Modifier and Type | Method and Description |
---|---|
TopGroups<?> |
BlockGroupingCollector.getTopGroups(Sort withinGroupSort,
int groupOffset,
int withinGroupOffset,
int maxDocsPerGroup)
Returns the grouped results.
|
static <T> java.util.Collection<SearchGroup<T>> |
SearchGroup.merge(java.util.List<java.util.Collection<SearchGroup<T>>> topGroups,
int offset,
int topN,
Sort groupSort)
Merges multiple collections of top groups, for example
obtained from separate index shards.
|
static <T> TopGroups<T> |
TopGroups.merge(TopGroups<T>[] shardGroups,
Sort groupSort,
Sort docSort,
int docOffset,
int docTopN,
TopGroups.ScoreMergeMode scoreMergeMode)
Merges an array of TopGroups, for example obtained
from the second-pass collector across multiple
shards.
|
static <T> AllGroupHeadsCollector<T> |
AllGroupHeadsCollector.newCollector(GroupSelector<T> selector,
Sort sort)
Create a new AllGroupHeadsCollector based on the type of within-group Sort required
|
GroupingSearch |
GroupingSearch.setGroupSort(Sort groupSort)
Specifies how groups are sorted.
|
GroupingSearch |
GroupingSearch.setSortWithinGroup(Sort sortWithinGroup)
Specified how documents inside a group are sorted.
|
Constructor and Description |
---|
AllGroupHeadsCollector(GroupSelector<T> selector,
Sort sort) |
BlockGroupingCollector(Sort groupSort,
int topNGroups,
boolean needsScores,
Weight lastDocPerGroup)
Create the single pass collector.
|
FirstPassGroupingCollector(GroupSelector<T> groupSelector,
Sort groupSort,
int topNGroups)
Create the first pass collector.
|
GroupComparator(Sort groupSort) |
GroupMerger(Sort groupSort) |
ScoringGroupHeadsCollector(GroupSelector<T> selector,
Sort sort) |
SortingGroupHead(Sort sort,
T groupValue,
int doc,
LeafReaderContext context,
Scorable scorer) |
SortingGroupHeadsCollector(GroupSelector<T> selector,
Sort sort) |
TopDocsReducer(Sort withinGroupSort,
int maxDocsPerGroup,
boolean getMaxScores) |
TopGroupsCollector(GroupSelector<T> groupSelector,
java.util.Collection<SearchGroup<T>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getMaxScores)
Create a new TopGroupsCollector
|