java.io.Closeable, java.lang.AutoCloseable, Releasable, RefCountedSubSearchContextpublic abstract class FilteredSearchContext extends SearchContext
SearchContext.LifetimeDEFAULT_TERMINATE_AFTER| Constructor | Description |
|---|---|
FilteredSearchContext(SearchContext in) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
accessed(long accessTime) |
|
void |
addRescore(RescoreContext rescore) |
|
void |
addSearchExt(SearchExtBuilder searchExtBuilder) |
|
SearchContextAggregations |
aggregations() |
|
SearchContext |
aggregations(SearchContextAggregations aggregations) |
|
org.apache.lucene.search.Query |
aliasFilter() |
|
BigArrays |
bigArrays() |
|
BitsetFilterCache |
bitsetFilterCache() |
|
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() |
|
SearchContext |
collapse(CollapseContext collapse) |
|
DfsSearchResult |
dfsResult() |
|
int[] |
docIdsToLoad() |
|
SearchContext |
docIdsToLoad(int[] docIdsToLoad,
int docsIdsToLoadFrom,
int docsIdsToLoadSize) |
|
int |
docIdsToLoadFrom() |
|
int |
docIdsToLoadSize() |
|
protected void |
doClose() |
|
boolean |
explain() |
|
void |
explain(boolean explain) |
|
FetchPhase |
fetchPhase() |
|
FetchSearchResult |
fetchResult() |
|
FetchSourceContext |
fetchSourceContext() |
|
SearchContext |
fetchSourceContext(FetchSourceContext fetchSourceContext) |
|
int |
from() |
|
SearchContext |
from(int from) |
|
<IFD extends IndexFieldData<?>> |
getForField(MappedFieldType fieldType) |
|
ObjectMapper |
getObjectMapper(java.lang.String name) |
|
long |
getOriginNanoTime() |
|
Profilers |
getProfilers() |
Return a handle over the profilers for the current search request, or
null if profiling is not enabled. |
QueryShardContext |
getQueryShardContext() |
|
SearchExtBuilder |
getSearchExt(java.lang.String name) |
|
SearchTask |
getTask() |
|
java.util.List<java.lang.String> |
groupStats() |
|
void |
groupStats(java.util.List<java.lang.String> groupStats) |
|
boolean |
hasFetchSourceContext() |
|
boolean |
hasScriptFields() |
|
boolean |
hasStoredFields() |
|
boolean |
hasStoredFieldsContext() |
|
SearchContextHighlight |
highlight() |
|
void |
highlight(SearchContextHighlight highlight) |
|
long |
id() |
|
IndexShard |
indexShard() |
|
InnerHitsContext |
innerHits() |
|
boolean |
isCancelled() |
|
long |
keepAlive() |
|
void |
keepAlive(long keepAlive) |
|
long |
lastAccessTime() |
|
SearchLookup |
lookup() |
|
boolean |
lowLevelCancellation() |
Indicates if the current index should perform frequent low level search cancellation check.
|
MapperService |
mapperService() |
|
java.lang.Float |
minimumScore() |
|
SearchContext |
minimumScore(float minimumScore) |
|
int |
numberOfShards() |
|
ParsedQuery |
parsedPostFilter() |
|
SearchContext |
parsedPostFilter(ParsedQuery postFilter) |
|
ParsedQuery |
parsedQuery() |
|
SearchContext |
parsedQuery(ParsedQuery query) |
|
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.
|
float |
queryBoost() |
|
java.util.Map<java.lang.Class<?>,org.apache.lucene.search.Collector> |
queryCollectors() |
Return a view of the additional query collectors that should be run for this context.
|
QuerySearchResult |
queryResult() |
|
ShardSearchRequest |
request() |
|
java.util.List<RescoreContext> |
rescore() |
|
ScriptFieldsContext |
scriptFields() |
|
ScrollContext |
scrollContext() |
|
SearchContext |
scrollContext(ScrollContext scroll) |
|
org.apache.lucene.search.FieldDoc |
searchAfter() |
|
SearchContext |
searchAfter(org.apache.lucene.search.FieldDoc searchAfter) |
|
ContextIndexSearcher |
searcher() |
|
SearchType |
searchType() |
|
void |
setTask(SearchTask task) |
|
SearchShardTarget |
shardTarget() |
|
SimilarityService |
similarityService() |
|
int |
size() |
|
SearchContext |
size(int size) |
|
MappedFieldType |
smartNameFieldType(java.lang.String name) |
Looks up the given field, but does not restrict to fields in the types set on this context.
|
SortAndFormats |
sort() |
|
SearchContext |
sort(SortAndFormats sort) |
|
java.lang.String |
source() |
|
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.
|
SuggestionSearchContext |
suggest() |
|
void |
suggest(SuggestionSearchContext suggest) |
|
int |
terminateAfter() |
|
void |
terminateAfter(int terminateAfter) |
|
org.apache.lucene.util.Counter |
timeEstimateCounter() |
|
TimeValue |
timeout() |
|
void |
timeout(TimeValue timeout) |
|
boolean |
trackScores() |
|
SearchContext |
trackScores(boolean trackScores) |
|
boolean |
trackTotalHits() |
Indicates if the total hit count for the query should be tracked.
|
SearchContext |
trackTotalHits(boolean trackTotalHits) |
|
boolean |
version() |
|
void |
version(boolean version) |
decRef, getName, incRef, refCount, tryIncRefclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddReleasable, alreadyClosed, clearReleasables, close, closeInternal, docValueFieldsContext, docValueFieldsContext, hasOnlySuggest, toStringpublic FilteredSearchContext(SearchContext in)
public boolean hasStoredFields()
hasStoredFields in class SearchContextpublic boolean hasStoredFieldsContext()
hasStoredFieldsContext in class SearchContextpublic boolean storedFieldsRequested()
SearchContextstoredFieldsRequested in class SearchContextpublic StoredFieldsContext storedFieldsContext()
storedFieldsContext in class SearchContextpublic SearchContext storedFieldsContext(StoredFieldsContext storedFieldsContext)
storedFieldsContext in class SearchContextprotected void doClose()
doClose in class SearchContextpublic void preProcess(boolean rewrite)
SearchContextpreProcess in class SearchContextrewrite - 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)
SearchContextbuildFilteredQuery in class SearchContextpublic long id()
id in class SearchContextpublic java.lang.String source()
source in class SearchContextpublic ShardSearchRequest request()
request in class SearchContextpublic SearchType searchType()
searchType in class SearchContextpublic SearchShardTarget shardTarget()
shardTarget in class SearchContextpublic int numberOfShards()
numberOfShards in class SearchContextpublic float queryBoost()
queryBoost in class SearchContextpublic long getOriginNanoTime()
getOriginNanoTime in class SearchContextpublic ScrollContext scrollContext()
scrollContext in class SearchContextpublic SearchContext scrollContext(ScrollContext scroll)
scrollContext in class SearchContextpublic SearchContextAggregations aggregations()
aggregations in class SearchContextpublic SearchContext aggregations(SearchContextAggregations aggregations)
aggregations in class SearchContextpublic SearchContextHighlight highlight()
highlight in class SearchContextpublic void highlight(SearchContextHighlight highlight)
highlight in class SearchContextpublic InnerHitsContext innerHits()
innerHits in class SearchContextpublic SuggestionSearchContext suggest()
suggest in class SearchContextpublic void suggest(SuggestionSearchContext suggest)
suggest in class SearchContextpublic java.util.List<RescoreContext> rescore()
rescore in class SearchContextpublic void addRescore(RescoreContext rescore)
addRescore in class SearchContextpublic boolean hasScriptFields()
hasScriptFields in class SearchContextpublic ScriptFieldsContext scriptFields()
scriptFields in class SearchContextpublic boolean sourceRequested()
SearchContextsourceRequested in class SearchContextpublic boolean hasFetchSourceContext()
hasFetchSourceContext in class SearchContextpublic FetchSourceContext fetchSourceContext()
fetchSourceContext in class SearchContextpublic SearchContext fetchSourceContext(FetchSourceContext fetchSourceContext)
fetchSourceContext in class SearchContextpublic ContextIndexSearcher searcher()
searcher in class SearchContextpublic IndexShard indexShard()
indexShard in class SearchContextpublic MapperService mapperService()
mapperService in class SearchContextpublic SimilarityService similarityService()
similarityService in class SearchContextpublic BigArrays bigArrays()
bigArrays in class SearchContextpublic BitsetFilterCache bitsetFilterCache()
bitsetFilterCache in class SearchContextpublic <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType)
getForField in class SearchContextpublic TimeValue timeout()
timeout in class SearchContextpublic void timeout(TimeValue timeout)
timeout in class SearchContextpublic int terminateAfter()
terminateAfter in class SearchContextpublic void terminateAfter(int terminateAfter)
terminateAfter in class SearchContextpublic boolean lowLevelCancellation()
SearchContextlowLevelCancellation in class SearchContextpublic SearchContext minimumScore(float minimumScore)
minimumScore in class SearchContextpublic java.lang.Float minimumScore()
minimumScore in class SearchContextpublic SearchContext sort(SortAndFormats sort)
sort in class SearchContextpublic SortAndFormats sort()
sort in class SearchContextpublic SearchContext trackScores(boolean trackScores)
trackScores in class SearchContextpublic boolean trackScores()
trackScores in class SearchContextpublic SearchContext trackTotalHits(boolean trackTotalHits)
trackTotalHits in class SearchContextpublic boolean trackTotalHits()
SearchContexttrackTotalHits in class SearchContextpublic SearchContext searchAfter(org.apache.lucene.search.FieldDoc searchAfter)
searchAfter in class SearchContextpublic org.apache.lucene.search.FieldDoc searchAfter()
searchAfter in class SearchContextpublic SearchContext parsedPostFilter(ParsedQuery postFilter)
parsedPostFilter in class SearchContextpublic ParsedQuery parsedPostFilter()
parsedPostFilter in class SearchContextpublic org.apache.lucene.search.Query aliasFilter()
aliasFilter in class SearchContextpublic SearchContext parsedQuery(ParsedQuery query)
parsedQuery in class SearchContextpublic ParsedQuery parsedQuery()
parsedQuery in class SearchContextpublic org.apache.lucene.search.Query query()
SearchContextquery in class SearchContextpublic int from()
from in class SearchContextpublic SearchContext from(int from)
from in class SearchContextpublic int size()
size in class SearchContextpublic SearchContext size(int size)
size in class SearchContextpublic boolean explain()
explain in class SearchContextpublic void explain(boolean explain)
explain in class SearchContextpublic java.util.List<java.lang.String> groupStats()
groupStats in class SearchContextpublic void groupStats(java.util.List<java.lang.String> groupStats)
groupStats in class SearchContextpublic boolean version()
version in class SearchContextpublic void version(boolean version)
version in class SearchContextpublic int[] docIdsToLoad()
docIdsToLoad in class SearchContextpublic int docIdsToLoadFrom()
docIdsToLoadFrom in class SearchContextpublic int docIdsToLoadSize()
docIdsToLoadSize in class SearchContextpublic SearchContext docIdsToLoad(int[] docIdsToLoad, int docsIdsToLoadFrom, int docsIdsToLoadSize)
docIdsToLoad in class SearchContextpublic void accessed(long accessTime)
accessed in class SearchContextpublic long lastAccessTime()
lastAccessTime in class SearchContextpublic long keepAlive()
keepAlive in class SearchContextpublic void keepAlive(long keepAlive)
keepAlive in class SearchContextpublic SearchLookup lookup()
lookup in class SearchContextpublic DfsSearchResult dfsResult()
dfsResult in class SearchContextpublic QuerySearchResult queryResult()
queryResult in class SearchContextpublic FetchSearchResult fetchResult()
fetchResult in class SearchContextpublic FetchPhase fetchPhase()
fetchPhase in class SearchContextpublic MappedFieldType smartNameFieldType(java.lang.String name)
SearchContextsmartNameFieldType in class SearchContextpublic ObjectMapper getObjectMapper(java.lang.String name)
getObjectMapper in class SearchContextpublic org.apache.lucene.util.Counter timeEstimateCounter()
timeEstimateCounter in class SearchContextpublic void addSearchExt(SearchExtBuilder searchExtBuilder)
addSearchExt in class SearchContextpublic SearchExtBuilder getSearchExt(java.lang.String name)
getSearchExt in class SearchContextpublic Profilers getProfilers()
SearchContextnull if profiling is not enabled.getProfilers in class SearchContextpublic java.util.Map<java.lang.Class<?>,org.apache.lucene.search.Collector> queryCollectors()
SearchContextqueryCollectors in class SearchContextpublic QueryShardContext getQueryShardContext()
getQueryShardContext in class SearchContextpublic void setTask(SearchTask task)
setTask in class SearchContextpublic SearchTask getTask()
getTask in class SearchContextpublic boolean isCancelled()
isCancelled in class SearchContextpublic SearchContext collapse(CollapseContext collapse)
collapse in class SearchContextpublic CollapseContext collapse()
collapse in class SearchContext