public class SubSearchContext extends FilteredSearchContext
SearchContext.Lifetime
DEFAULT_TERMINATE_AFTER
Constructor and Description |
---|
SubSearchContext(SearchContext context) |
Modifier and Type | Method and Description |
---|---|
void |
accessed(long accessTime) |
void |
addRescore(RescoreSearchContext rescore) |
SearchContext |
aggregations(SearchContextAggregations aggregations) |
org.apache.lucene.search.Query |
buildFilteredQuery(org.apache.lucene.search.Query query)
Automatically apply all required filters to the given query such as
alias filters, types filters, etc.
|
CollapseContext |
collapse() |
int[] |
docIdsToLoad() |
SearchContext |
docIdsToLoad(int[] docIdsToLoad,
int docsIdsToLoadFrom,
int docsIdsToLoadSize) |
int |
docIdsToLoadFrom() |
int |
docIdsToLoadSize() |
protected void |
doClose() |
DocValueFieldsContext |
docValueFieldsContext() |
SearchContext |
docValueFieldsContext(DocValueFieldsContext docValueFieldsContext) |
boolean |
explain() |
void |
explain(boolean explain) |
FetchSearchResult |
fetchResult() |
FetchSourceContext |
fetchSourceContext() |
SearchContext |
fetchSourceContext(FetchSourceContext fetchSourceContext) |
int |
from() |
SearchContext |
from(int from) |
void |
groupStats(java.util.List<java.lang.String> groupStats) |
boolean |
hasFetchSourceContext() |
boolean |
hasScriptFields() |
boolean |
hasStoredFields() |
boolean |
hasStoredFieldsContext() |
SearchContextHighlight |
highlight() |
void |
highlight(SearchContextHighlight highlight) |
void |
keepAlive(long keepAlive) |
SearchContext |
minimumScore(float minimumScore) |
SearchContext |
parsedPostFilter(ParsedQuery postFilter) |
ParsedQuery |
parsedQuery() |
SearchContext |
parsedQuery(ParsedQuery parsedQuery) |
void |
preProcess(boolean rewrite)
Should be called before executing the main query and after all other parameters have been set.
|
org.apache.lucene.search.Query |
query()
The query to execute, might be rewritten.
|
QuerySearchResult |
queryResult() |
ScriptFieldsContext |
scriptFields() |
SearchContext |
scrollContext(ScrollContext scrollContext) |
int |
size() |
SearchContext |
size(int size) |
SortAndFormats |
sort() |
SearchContext |
sort(SortAndFormats sort) |
boolean |
sourceRequested()
A shortcut function to see whether there is a fetchSourceContext and it says the source is requested.
|
StoredFieldsContext |
storedFieldsContext() |
SearchContext |
storedFieldsContext(StoredFieldsContext storedFieldsContext) |
boolean |
storedFieldsRequested()
A shortcut function to see whether there is a storedFieldsContext and it says the fields are requested.
|
void |
suggest(SuggestionSearchContext suggest) |
void |
terminateAfter(int terminateAfter) |
org.apache.lucene.util.Counter |
timeEstimateCounter() |
void |
timeout(TimeValue timeout) |
boolean |
trackScores() |
SearchContext |
trackScores(boolean trackScores) |
boolean |
version() |
void |
version(boolean version) |
addSearchExt, aggregations, aliasFilter, bigArrays, bitsetFilterCache, collapse, dfsResult, fetchPhase, fieldData, getObjectMapper, getOriginNanoTime, getProfilers, getQueryShardContext, getSearchExt, getTask, groupStats, id, indexShard, innerHits, isCancelled, keepAlive, lastAccessTime, lookup, lowLevelCancellation, mapperService, minimumScore, numberOfShards, parsedPostFilter, queryBoost, queryCollectors, request, rescore, scrollContext, searchAfter, searchAfter, searcher, searchType, setTask, shardTarget, similarityService, smartNameFieldType, source, suggest, terminateAfter, timeout
addReleasable, alreadyClosed, clearReleasables, close, closeInternal, hasOnlySuggest, toString
public SubSearchContext(SearchContext context)
protected void doClose()
doClose
in class FilteredSearchContext
public void preProcess(boolean rewrite)
SearchContext
preProcess
in class FilteredSearchContext
rewrite
- if the set query should be rewritten against the searcher returned from SearchContext.searcher()
public org.apache.lucene.search.Query buildFilteredQuery(org.apache.lucene.search.Query query)
SearchContext
buildFilteredQuery
in class FilteredSearchContext
public SearchContext scrollContext(ScrollContext scrollContext)
scrollContext
in class FilteredSearchContext
public SearchContext aggregations(SearchContextAggregations aggregations)
aggregations
in class FilteredSearchContext
public SearchContextHighlight highlight()
highlight
in class FilteredSearchContext
public void highlight(SearchContextHighlight highlight)
highlight
in class FilteredSearchContext
public void suggest(SuggestionSearchContext suggest)
suggest
in class FilteredSearchContext
public void addRescore(RescoreSearchContext rescore)
addRescore
in class FilteredSearchContext
public boolean hasScriptFields()
hasScriptFields
in class FilteredSearchContext
public ScriptFieldsContext scriptFields()
scriptFields
in class FilteredSearchContext
public boolean sourceRequested()
SearchContext
sourceRequested
in class FilteredSearchContext
public boolean hasFetchSourceContext()
hasFetchSourceContext
in class FilteredSearchContext
public FetchSourceContext fetchSourceContext()
fetchSourceContext
in class FilteredSearchContext
public SearchContext fetchSourceContext(FetchSourceContext fetchSourceContext)
fetchSourceContext
in class FilteredSearchContext
public DocValueFieldsContext docValueFieldsContext()
docValueFieldsContext
in class SearchContext
public SearchContext docValueFieldsContext(DocValueFieldsContext docValueFieldsContext)
docValueFieldsContext
in class SearchContext
public void timeout(TimeValue timeout)
timeout
in class FilteredSearchContext
public void terminateAfter(int terminateAfter)
terminateAfter
in class FilteredSearchContext
public SearchContext minimumScore(float minimumScore)
minimumScore
in class FilteredSearchContext
public SearchContext sort(SortAndFormats sort)
sort
in class FilteredSearchContext
public SortAndFormats sort()
sort
in class FilteredSearchContext
public SearchContext parsedQuery(ParsedQuery parsedQuery)
parsedQuery
in class FilteredSearchContext
public ParsedQuery parsedQuery()
parsedQuery
in class FilteredSearchContext
public org.apache.lucene.search.Query query()
SearchContext
query
in class FilteredSearchContext
public SearchContext trackScores(boolean trackScores)
trackScores
in class FilteredSearchContext
public boolean trackScores()
trackScores
in class FilteredSearchContext
public SearchContext parsedPostFilter(ParsedQuery postFilter)
parsedPostFilter
in class FilteredSearchContext
public int from()
from
in class FilteredSearchContext
public SearchContext from(int from)
from
in class FilteredSearchContext
public int size()
size
in class FilteredSearchContext
public SearchContext size(int size)
size
in class FilteredSearchContext
public boolean hasStoredFields()
hasStoredFields
in class FilteredSearchContext
public boolean hasStoredFieldsContext()
hasStoredFieldsContext
in class FilteredSearchContext
public boolean storedFieldsRequested()
SearchContext
storedFieldsRequested
in class FilteredSearchContext
public StoredFieldsContext storedFieldsContext()
storedFieldsContext
in class FilteredSearchContext
public SearchContext storedFieldsContext(StoredFieldsContext storedFieldsContext)
storedFieldsContext
in class FilteredSearchContext
public boolean explain()
explain
in class FilteredSearchContext
public void explain(boolean explain)
explain
in class FilteredSearchContext
public void groupStats(java.util.List<java.lang.String> groupStats)
groupStats
in class FilteredSearchContext
public boolean version()
version
in class FilteredSearchContext
public void version(boolean version)
version
in class FilteredSearchContext
public int[] docIdsToLoad()
docIdsToLoad
in class FilteredSearchContext
public int docIdsToLoadFrom()
docIdsToLoadFrom
in class FilteredSearchContext
public int docIdsToLoadSize()
docIdsToLoadSize
in class FilteredSearchContext
public SearchContext docIdsToLoad(int[] docIdsToLoad, int docsIdsToLoadFrom, int docsIdsToLoadSize)
docIdsToLoad
in class FilteredSearchContext
public CollapseContext collapse()
collapse
in class FilteredSearchContext
public void accessed(long accessTime)
accessed
in class FilteredSearchContext
public void keepAlive(long keepAlive)
keepAlive
in class FilteredSearchContext
public QuerySearchResult queryResult()
queryResult
in class FilteredSearchContext
public FetchSearchResult fetchResult()
fetchResult
in class FilteredSearchContext
public org.apache.lucene.util.Counter timeEstimateCounter()
timeEstimateCounter
in class FilteredSearchContext