Uses of Class
org.apache.lucene.search.Sort
Packages that use Sort
Package
Description
Code to maintain and access indices.
Code to search indices.
-
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.Methods 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.sort()Returns the value of thesortrecord component.Methods in org.apache.lucene.index with parameters of type SortModifier and TypeMethodDescriptionIndexWriterConfig.setIndexSort(Sort sort) Set theSortorder to use for all (flushed and merged) segments.CheckIndex.testSort(CodecReader reader, Sort sort, PrintStream infoStream, boolean failFast) Tests index sort order.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. -
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.Methods 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 TypeMethodDescriptionstatic 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.Search implementation with arbitrary sorting.Search implementation with arbitrary sorting, plus control over whether hit scores and max score should be computed.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 SortModifierConstructorDescriptionSortRescorer(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) Deprecated.
TopFieldCollectorManager(Sort, int, FieldDoc, int), the supportsConcurrency parameter is now a no-op.