Uses of Class
org.apache.lucene.search.Sort
Packages that use Sort
Package
Description
Code to maintain and access indices.
Code to search indices.
Grouping.
Analyzer based autosuggest.
-
Uses of Sort in org.apache.lucene.index
Fields in org.apache.lucene.index declared as SortModifier and TypeFieldDescriptionprotected SortLiveIndexWriterConfig.indexSortThe sort order to use to write merged segments.private final SortSegmentInfo.indexSortprivate final SortLeafMetaData.sort(package private) final SortSorter.sortMethods in org.apache.lucene.index that return SortModifier and TypeMethodDescriptionLiveIndexWriterConfig.getIndexSort()Get the index-timeSortorder, applied to all (flushed and merged) segments.SegmentInfo.getIndexSort()Return the sort order of this segment, or null if the index has no sort.LeafMetaData.getSort()Return the order in which documents from this index are sorted, ornullif documents are in no particular order.Methods in org.apache.lucene.index with parameters of type SortModifier and TypeMethodDescriptionprivate MergeState.DocMap[]MergeState.buildDocMaps(List<CodecReader> readers, Sort indexSort) (package private) static booleanIndexWriter.isCongruentSort(Sort indexSort, Sort otherSort) Returns true ifindexSortis a prefix ofotherSort.IndexWriterConfig.setIndexSort(Sort sort) Set theSortorder to use for all (flushed and merged) segments.(package private) static MergeState.DocMap[]MultiSorter.sort(Sort sort, List<CodecReader> readers) Does a merge sort of the leaves of the incoming reader, returningMergeState.DocMapto map each leaf's documents into the merged segment.CheckIndex.testSort(CodecReader reader, Sort sort, PrintStream infoStream, boolean failFast) Tests index sort order.private voidIndexingChain.validateIndexSortDVType(Sort indexSort, String fieldToValidate, DocValuesType dvType) static CodecReaderSortingCodecReader.wrap(CodecReader reader, Sorter.DocMap docMap, Sort sort) Expert: same asSortingCodecReader.wrap(org.apache.lucene.index.CodecReader, Sort)but operates directly on aSorter.DocMap.static CodecReaderSortingCodecReader.wrap(CodecReader reader, Sort sort) Return a sorted view ofreaderaccording to the order defined bysort.Constructors in org.apache.lucene.index with parameters of type SortModifierConstructorDescriptionLeafMetaData(int createdVersionMajor, Version minVersion, Sort sort, boolean hasBlocks) Expert: Sole constructor.SegmentInfo(Directory dir, Version version, Version minVersion, String name, int maxDoc, boolean isCompoundFile, boolean hasBlocks, Codec codec, Map<String, String> diagnostics, byte[] id, Map<String, String> attributes, Sort indexSort) Construct a new complete SegmentInfo instance from input.(package private)Creates a new Sorter to sort the index withsort -
Uses of Sort in org.apache.lucene.search
Fields in org.apache.lucene.search declared as SortModifier and TypeFieldDescriptionstatic final SortSort.INDEXORDERRepresents sorting by index order.static final SortSort.RELEVANCERepresents sorting by computed relevance.private final SortSortRescorer.sort(package private) final SortTopFieldCollector.PagingFieldCollector.sort(package private) final SortTopFieldCollector.SimpleFieldCollector.sortprivate final SortTopFieldCollectorManager.sortMethods in org.apache.lucene.search that return SortModifier and TypeMethodDescriptionSort.rewrite(IndexSearcher searcher) Rewrites the SortFields in this Sort, returning a new Sort if any of the fields changes during their rewriting.Methods in org.apache.lucene.search with parameters of type SortModifier and TypeMethodDescription(package private) static booleanTopFieldCollector.canEarlyTerminate(Sort searchSort, Sort indexSort) private static booleanTopFieldCollector.canEarlyTerminateOnDocId(Sort searchSort) private static booleanTopFieldCollector.canEarlyTerminateOnPrefix(Sort searchSort, Sort indexSort) static TopFieldCollectorDeprecated.static TopFieldCollectorDeprecated.This method is deprecated in favor of the constructor ofTopFieldCollectorManagerdue to its support for concurrency in IndexSearcherTopFieldCollector.createSharedManager(Sort sort, int numHits, FieldDoc after, int totalHitsThreshold) Deprecated.This method is deprecated in favor of the constructor ofTopFieldCollectorManagerdue to its support for concurrency in IndexSearcherstatic TopFieldDocsTopDocs.merge(Sort sort, int start, int topN, TopFieldDocs[] shardHits) Same asTopDocs.merge(Sort, int, TopFieldDocs[])but also ignores the topstarttop docs.static TopFieldDocsTopDocs.merge(Sort sort, int start, int topN, TopFieldDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) Pass in a custom tie breaker for ordering resultsstatic TopFieldDocsTopDocs.merge(Sort sort, int topN, TopFieldDocs[] shardHits) Returns a new TopFieldDocs, containing topN results across the provided TopFieldDocs, sorting by the specifiedSort.private static TopDocsTopDocs.mergeAux(Sort sort, int start, int size, TopDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) Auxiliary method used by theTopDocs.merge(int, org.apache.lucene.search.TopDocs[])impls.Search implementation with arbitrary sorting.Search implementation with arbitrary sorting, plus control over whether hit scores and max score should be computed.private TopFieldDocsIndexSearcher.searchAfter(FieldDoc after, Query query, int numHits, Sort sort, boolean doDocScores) IndexSearcher.searchAfter(ScoreDoc after, Query query, int n, Sort sort) Finds the topnhits forquerywhere all results are after a previous result (after).IndexSearcher.searchAfter(ScoreDoc after, Query query, int numHits, Sort sort, boolean doDocScores) Finds the topnhits forquerywhere all results are after a previous result (after), allowing control over whether hit scores and max score should be computed.Constructors in org.apache.lucene.search with parameters of type SortModifierConstructorDescriptionMergeSortQueue(Sort sort, TopDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) PagingFieldCollector(Sort sort, FieldValueHitQueue<FieldValueHitQueue.Entry> queue, FieldDoc after, int numHits, HitsThresholdChecker hitsThresholdChecker, MaxScoreAccumulator minScoreAcc) SimpleFieldCollector(Sort sort, FieldValueHitQueue<FieldValueHitQueue.Entry> queue, int numHits, HitsThresholdChecker hitsThresholdChecker, MaxScoreAccumulator minScoreAcc) SortRescorer(Sort sort) Sole constructor.TopFieldCollectorManager(Sort sort, int numHits, int totalHitsThreshold) Creates a newTopFieldCollectorManagerfrom the given arguments, with thread-safe internal states.TopFieldCollectorManager(Sort sort, int numHits, FieldDoc after, int totalHitsThreshold) Creates a newTopFieldCollectorManagerfrom the given arguments, with thread-safe internal states.TopFieldCollectorManager(Sort sort, int numHits, FieldDoc after, int totalHitsThreshold, boolean supportsConcurrency) Creates a newTopFieldCollectorManagerfrom the given arguments.(package private)TopFieldLeafCollector(FieldValueHitQueue<FieldValueHitQueue.Entry> queue, Sort sort, LeafReaderContext context) -
Uses of Sort in org.apache.lucene.search.grouping
Fields in org.apache.lucene.search.grouping declared as SortModifier and TypeFieldDescriptionprivate final SortBlockGroupingCollector.groupSortprivate SortGroupingSearch.groupSortprivate final SortTopGroupsCollector.groupSortprotected final SortAllGroupHeadsCollector.sortprivate SortGroupingSearch.sortWithinGroupprivate final SortTopGroupsCollector.withinGroupSortMethods in org.apache.lucene.search.grouping with parameters of type SortModifier and TypeMethodDescriptionTopGroups<?> BlockGroupingCollector.getTopGroups(Sort withinGroupSort, int groupOffset, int withinGroupOffset, int maxDocsPerGroup) Returns the grouped results.static <T> Collection<SearchGroup<T>> SearchGroup.merge(List<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 requiredGroupingSearch.setGroupSort(Sort groupSort) Specifies how groups are sorted.GroupingSearch.setSortWithinGroup(Sort sortWithinGroup) Specified how documents inside a group are sorted.Constructors in org.apache.lucene.search.grouping with parameters of type SortModifierConstructorDescriptionprivateAllGroupHeadsCollector(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) protectedScoringGroupHeadsCollector(GroupSelector<T> selector, Sort sort) protectedSortingGroupHead(Sort sort, T groupValue, int doc, LeafReaderContext context, Scorable scorer) protectedSortingGroupHeadsCollector(GroupSelector<T> selector, Sort sort) (package private)TopDocsReducer(Sort withinGroupSort, int maxDocsPerGroup, boolean getMaxScores) TopGroupsCollector(GroupSelector<T> groupSelector, Collection<SearchGroup<T>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getMaxScores) Create a new TopGroupsCollector -
Uses of Sort in org.apache.lucene.search.suggest.analyzing
Fields in org.apache.lucene.search.suggest.analyzing declared as Sort
TopFieldCollectorManagerdue to its support for concurrency in IndexSearcher