public class SearchPhaseController extends AbstractComponent
Modifier and Type | Field and Description |
---|---|
static org.apache.lucene.search.ScoreDoc[] |
EMPTY_DOCS |
static Comparator<AtomicArray.Entry<? extends QuerySearchResultProvider>> |
QUERY_RESULT_ORDERING |
static String |
SEARCH_CONTROLLER_OPTIMIZE_SINGLE_SHARD_KEY |
deprecationLogger, logger, settings
Constructor and Description |
---|
SearchPhaseController(Settings settings,
BigArrays bigArrays,
ScriptService scriptService) |
Modifier and Type | Method and Description |
---|---|
AggregatedDfs |
aggregateDfs(AtomicArray<DfsSearchResult> results) |
void |
fillDocIdsToLoad(AtomicArray<com.carrotsearch.hppc.IntArrayList> docsIdsToLoad,
org.apache.lucene.search.ScoreDoc[] shardDocs)
Builds an array, with potential null elements, with docs to load.
|
org.apache.lucene.search.ScoreDoc[] |
getLastEmittedDocPerShard(org.apache.lucene.search.ScoreDoc[] sortedShardList,
int numShards) |
org.apache.lucene.search.ScoreDoc[] |
getLastEmittedDocPerShard(SearchRequest request,
org.apache.lucene.search.ScoreDoc[] sortedShardList,
int numShards) |
InternalSearchResponse |
merge(org.apache.lucene.search.ScoreDoc[] sortedDocs,
AtomicArray<? extends QuerySearchResultProvider> queryResultsArr,
AtomicArray<? extends FetchSearchResultProvider> fetchResultsArr,
HasContextAndHeaders headersContext) |
boolean |
optimizeSingleShard() |
org.apache.lucene.search.ScoreDoc[] |
sortDocs(boolean ignoreFrom,
AtomicArray<? extends QuerySearchResultProvider> resultsArr) |
logDeprecatedSetting, logRemovedSetting, nodeName
public static final Comparator<AtomicArray.Entry<? extends QuerySearchResultProvider>> QUERY_RESULT_ORDERING
public static final org.apache.lucene.search.ScoreDoc[] EMPTY_DOCS
public static final String SEARCH_CONTROLLER_OPTIMIZE_SINGLE_SHARD_KEY
@Inject public SearchPhaseController(Settings settings, BigArrays bigArrays, ScriptService scriptService)
public boolean optimizeSingleShard()
public AggregatedDfs aggregateDfs(AtomicArray<DfsSearchResult> results)
public org.apache.lucene.search.ScoreDoc[] sortDocs(boolean ignoreFrom, AtomicArray<? extends QuerySearchResultProvider> resultsArr) throws IOException
ignoreFrom
- Whether to ignore the from and sort all hits in each shard result.
Enabled only for scroll search, because that only retrieves hits of length 'size' in the query phase.resultsArr
- Shard result holderIOException
public org.apache.lucene.search.ScoreDoc[] getLastEmittedDocPerShard(SearchRequest request, org.apache.lucene.search.ScoreDoc[] sortedShardList, int numShards)
public org.apache.lucene.search.ScoreDoc[] getLastEmittedDocPerShard(org.apache.lucene.search.ScoreDoc[] sortedShardList, int numShards)
public void fillDocIdsToLoad(AtomicArray<com.carrotsearch.hppc.IntArrayList> docsIdsToLoad, org.apache.lucene.search.ScoreDoc[] shardDocs)
public InternalSearchResponse merge(org.apache.lucene.search.ScoreDoc[] sortedDocs, AtomicArray<? extends QuerySearchResultProvider> queryResultsArr, AtomicArray<? extends FetchSearchResultProvider> fetchResultsArr, HasContextAndHeaders headersContext)
Copyright © 2009–2016. All rights reserved.