Uses of Class
org.apache.lucene.search.Sort
-
Packages that use Sort 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.org.apache.lucene.search.suggest.analyzing Analyzer based autosuggest. -
-
Uses of Sort in org.apache.lucene.index
Fields in org.apache.lucene.index declared as Sort Modifier and Type Field Description protected SortLiveIndexWriterConfig. indexSortThe sort order to use to write merged segments.private SortSegmentInfo. indexSortprivate SortLeafMetaData. sort(package private) SortSorter. sortMethods in org.apache.lucene.index that return Sort Modifier and Type Method Description SortLiveIndexWriterConfig. getIndexSort()Get the index-timeSortorder, applied to all (flushed and merged) segments.SortSegmentInfo. getIndexSort()Return the sort order of this segment, or null if the index has no sort.SortLeafMetaData. 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 Sort Modifier and Type Method Description private MergeState.DocMap[]MergeState. buildDocMaps(java.util.List<CodecReader> readers, Sort indexSort)(package private) static booleanIndexWriter. isCongruentSort(Sort indexSort, Sort otherSort)Returns true ifindexSortis a prefix ofotherSort.IndexWriterConfigIndexWriterConfig. setIndexSort(Sort sort)Set theSortorder 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, returningMergeState.DocMapto map each leaf's documents into the merged segment.static CheckIndex.Status.IndexSortStatusCheckIndex. testSort(CodecReader reader, Sort sort, java.io.PrintStream infoStream, boolean failFast)Tests index sort order.private voidDefaultIndexingChain. validateIndexSortDVType(Sort indexSort, java.lang.String fieldToValidate, DocValuesType dvType)(package private) 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 Sort Constructor 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 withsort -
Uses of Sort in org.apache.lucene.search
Fields in org.apache.lucene.search declared as Sort Modifier and Type Field Description static SortSort. INDEXORDERRepresents sorting by index order.static SortSort. RELEVANCERepresents sorting by computed relevance.private SortSortRescorer. sort(package private) SortTopFieldCollector.PagingFieldCollector. sort(package private) SortTopFieldCollector.SimpleFieldCollector. sortMethods in org.apache.lucene.search that return Sort Modifier and Type Method Description SortSort. 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 Sort Modifier and Type Method Description (package private) static booleanTopFieldCollector. canEarlyTerminate(Sort searchSort, Sort indexSort)private static booleanTopFieldCollector. canEarlyTerminateOnDocId(Sort searchSort)private static booleanTopFieldCollector. canEarlyTerminateOnPrefix(Sort searchSort, Sort indexSort)static TopFieldCollectorTopFieldCollector. create(Sort sort, int numHits, int totalHitsThreshold)Creates a newTopFieldCollectorfrom the given arguments.static TopFieldCollectorTopFieldCollector. create(Sort sort, int numHits, FieldDoc after, int totalHitsThreshold)Creates a newTopFieldCollectorfrom the given arguments.(package private) static TopFieldCollectorTopFieldCollector. create(Sort sort, int numHits, FieldDoc after, HitsThresholdChecker hitsThresholdChecker, MaxScoreAccumulator minScoreAcc)Same as above with additional parameters to allow passing in the threshold checker and the max score accumulator.static CollectorManager<TopFieldCollector,TopFieldDocs>TopFieldCollector. createSharedManager(Sort sort, int numHits, FieldDoc after, int totalHitsThreshold)Create a CollectorManager which uses a shared hit counter to maintain number of hits and a sharedMaxScoreAccumulatorto propagate the minimum score accross segments if the primary sort is by relevancy.static TopFieldDocsTopDocs. merge(Sort sort, int start, int topN, TopFieldDocs[] shardHits, boolean setShardIndex)Same asTopDocs.merge(Sort, int, TopFieldDocs[])but also ignores the topstarttop docs.static 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, boolean setShardIndex)Auxiliary method used by theTopDocs.merge(int, org.apache.lucene.search.TopDocs[])impls.TopFieldDocsIndexSearcher. search(Query query, int n, Sort sort)Search implementation with arbitrary sorting.TopFieldDocsIndexSearcher. 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 TopFieldDocsIndexSearcher. searchAfter(FieldDoc after, Query query, int numHits, Sort sort, boolean doDocScores)TopDocsIndexSearcher. searchAfter(ScoreDoc after, Query query, int n, Sort sort)Finds the topnhits forquerywhere all results are after a previous result (after).TopFieldDocsIndexSearcher. 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 Sort Constructor Description MergeSortQueue(Sort sort, TopDocs[] shardHits)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. -
Uses of Sort in org.apache.lucene.search.grouping
Fields in org.apache.lucene.search.grouping declared as Sort Modifier and Type Field Description private SortBlockGroupingCollector. groupSortprivate SortGroupingSearch. groupSortprivate SortTopGroupsCollector. groupSortprotected SortAllGroupHeadsCollector. sortprivate SortGroupingSearch. sortWithinGroupprivate SortTopGroupsCollector. withinGroupSortMethods in org.apache.lucene.search.grouping with parameters of type Sort Modifier and Type Method 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 requiredGroupingSearchGroupingSearch. setGroupSort(Sort groupSort)Specifies how groups are sorted.GroupingSearchGroupingSearch. setSortWithinGroup(Sort sortWithinGroup)Specified how documents inside a group are sorted.Constructors in org.apache.lucene.search.grouping with parameters of type Sort Constructor 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 -
Uses of Sort in org.apache.lucene.search.suggest.analyzing
Fields in org.apache.lucene.search.suggest.analyzing declared as Sort Modifier and Type Field Description private static SortAnalyzingInfixSuggester. SORTHow we sort the postings and search results.
-