Uses of Class
org.apache.lucene.search.Sort
-
-
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.Methods 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 IndexWriterConfigIndexWriterConfig. setIndexSort(Sort sort)Set theSortorder to use for all (flushed and merged) segments.static CheckIndex.Status.IndexSortStatusCheckIndex. testSort(CodecReader reader, Sort sort, PrintStream infoStream, boolean failFast)Tests index sort order.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, String name, int maxDoc, boolean isCompoundFile, 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.queries
Constructors in org.apache.lucene.queries with parameters of type Sort Constructor Description SearchAfterSortedDocQuery(Sort sort, FieldDoc after) -
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.Methods 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 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.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.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.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. -
Uses of Sort in org.apache.lucene.search.grouping
Fields in org.apache.lucene.search.grouping declared as Sort Modifier and Type Field Description protected SortCollapsingTopDocsCollector. sortMethods in org.apache.lucene.search.grouping with parameters of type Sort Modifier and Type Method Description static CollapsingTopDocsCollector<?>CollapsingTopDocsCollector. createKeyword(String collapseField, MappedFieldType collapseFieldType, Sort sort, int topN)Create a collapsing top docs collector on aSortedDocValuesfield.static CollapsingTopDocsCollector<?>CollapsingTopDocsCollector. createNumeric(String collapseField, MappedFieldType collapseFieldType, Sort sort, int topN)Create a collapsing top docs collector on aNumericDocValuesfield.static CollapseTopFieldDocsCollapseTopFieldDocs. merge(Sort sort, int start, int size, CollapseTopFieldDocs[] shardHits, boolean setShardIndex)Returns a new CollapseTopDocs, containing topN collapsed results across the provided CollapseTopDocs, sorting by score.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.Constructors in org.apache.lucene.search.grouping with parameters of type Sort Constructor Description FirstPassGroupingCollector(GroupSelector<T> groupSelector, Sort groupSort, int topNGroups)Create the first pass collector. -
Uses of Sort in org.elasticsearch.common.lucene
Methods in org.elasticsearch.common.lucene with parameters of type Sort Modifier and Type Method Description static booleanLucene. canEarlyTerminate(Sort searchSort, Sort indexSort)Whether a query sorted bysearchSortcan be early-terminated if the index is sorted byindexSort. -
Uses of Sort in org.elasticsearch.index
Methods in org.elasticsearch.index that return Sort Modifier and Type Method Description SortIndexSortConfig. buildIndexSort(Function<String,MappedFieldType> fieldTypeLookup, Function<MappedFieldType,IndexFieldData<?>> fieldDataLookup)Builds theSortorder from the settings for this index or returns null if this index has no sort.Methods in org.elasticsearch.index that return types with arguments of type Sort Modifier and Type Method Description Supplier<Sort>IndexService. getIndexSortSupplier() -
Uses of Sort in org.elasticsearch.index.engine
Fields in org.elasticsearch.index.engine declared as Sort Modifier and Type Field Description SortSegment. segmentSortMethods in org.elasticsearch.index.engine that return Sort Modifier and Type Method Description SortEngineConfig. getIndexSort()Return the sort order of this index, or null if the index has no sort.SortSegment. getSegmentSort()Return the sort order of this segment, or null if the segment has no sort.Constructors in org.elasticsearch.index.engine with parameters of type Sort Constructor Description EngineConfig(ShardId shardId, String allocationId, ThreadPool threadPool, IndexSettings indexSettings, Engine.Warmer warmer, Store store, MergePolicy mergePolicy, Analyzer analyzer, Similarity similarity, CodecService codecService, Engine.EventListener eventListener, QueryCache queryCache, QueryCachingPolicy queryCachingPolicy, TranslogConfig translogConfig, TimeValue flushMergesAfter, List<ReferenceManager.RefreshListener> externalRefreshListener, List<ReferenceManager.RefreshListener> internalRefreshListener, Sort indexSort, CircuitBreakerService circuitBreakerService, LongSupplier globalCheckpointSupplier, Supplier<RetentionLeases> retentionLeasesSupplier, LongSupplier primaryTermSupplier, EngineConfig.TombstoneDocSupplier tombstoneDocSupplier)Creates a newEngineConfig -
Uses of Sort in org.elasticsearch.index.shard
Methods in org.elasticsearch.index.shard that return Sort Modifier and Type Method Description SortIndexShard. getIndexSort()Return the sort order of this index, or null if the index has no sort.Constructor parameters in org.elasticsearch.index.shard with type arguments of type Sort Constructor Description IndexShard(ShardRouting shardRouting, IndexSettings indexSettings, ShardPath path, Store store, Supplier<Sort> indexSortSupplier, IndexCache indexCache, MapperService mapperService, SimilarityService similarityService, EngineFactory engineFactory, IndexEventListener indexEventListener, CheckedFunction<DirectoryReader,DirectoryReader,IOException> indexReaderWrapper, ThreadPool threadPool, BigArrays bigArrays, Engine.Warmer warmer, List<SearchOperationListener> searchOperationListener, List<IndexingOperationListener> listeners, Runnable globalCheckpointSyncer, RetentionLeaseSyncer retentionLeaseSyncer, CircuitBreakerService circuitBreakerService) -
Uses of Sort in org.elasticsearch.search.collapse
Methods in org.elasticsearch.search.collapse with parameters of type Sort Modifier and Type Method Description CollapsingTopDocsCollector<?>CollapseContext. createTopDocs(Sort sort, int topN) -
Uses of Sort in org.elasticsearch.search.sort
Fields in org.elasticsearch.search.sort declared as Sort Modifier and Type Field Description SortSortAndFormats. sortConstructors in org.elasticsearch.search.sort with parameters of type Sort Constructor Description SortAndFormats(Sort sort, DocValueFormat[] formats)
-