public abstract class FilteredSearchContext extends SearchContext
SearchContext.Lifetime
DEFAULT_TERMINATE_AFTER
Constructor and Description |
---|
FilteredSearchContext(SearchContext in) |
Modifier and Type | Method and Description |
---|---|
void |
accessed(long accessTime) |
void |
addRescore(RescoreSearchContext 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) |
IndexFieldDataService |
fieldData() |
int |
from() |
SearchContext |
from(int from) |
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<RescoreSearchContext> |
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 |
version() |
void |
version(boolean version) |
addReleasable, alreadyClosed, clearReleasables, close, closeInternal, docValueFieldsContext, docValueFieldsContext, hasOnlySuggest, toString
public FilteredSearchContext(SearchContext in)
public boolean hasStoredFields()
hasStoredFields
in class SearchContext
public boolean hasStoredFieldsContext()
hasStoredFieldsContext
in class SearchContext
public boolean storedFieldsRequested()
SearchContext
storedFieldsRequested
in class SearchContext
public StoredFieldsContext storedFieldsContext()
storedFieldsContext
in class SearchContext
public SearchContext storedFieldsContext(StoredFieldsContext storedFieldsContext)
storedFieldsContext
in class SearchContext
protected void doClose()
doClose
in class SearchContext
public void preProcess(boolean rewrite)
SearchContext
preProcess
in class SearchContext
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 SearchContext
public long id()
id
in class SearchContext
public java.lang.String source()
source
in class SearchContext
public ShardSearchRequest request()
request
in class SearchContext
public SearchType searchType()
searchType
in class SearchContext
public SearchShardTarget shardTarget()
shardTarget
in class SearchContext
public int numberOfShards()
numberOfShards
in class SearchContext
public float queryBoost()
queryBoost
in class SearchContext
public long getOriginNanoTime()
getOriginNanoTime
in class SearchContext
public ScrollContext scrollContext()
scrollContext
in class SearchContext
public SearchContext scrollContext(ScrollContext scroll)
scrollContext
in class SearchContext
public SearchContextAggregations aggregations()
aggregations
in class SearchContext
public SearchContext aggregations(SearchContextAggregations aggregations)
aggregations
in class SearchContext
public SearchContextHighlight highlight()
highlight
in class SearchContext
public void highlight(SearchContextHighlight highlight)
highlight
in class SearchContext
public InnerHitsContext innerHits()
innerHits
in class SearchContext
public SuggestionSearchContext suggest()
suggest
in class SearchContext
public void suggest(SuggestionSearchContext suggest)
suggest
in class SearchContext
public java.util.List<RescoreSearchContext> rescore()
rescore
in class SearchContext
public void addRescore(RescoreSearchContext rescore)
addRescore
in class SearchContext
public boolean hasScriptFields()
hasScriptFields
in class SearchContext
public ScriptFieldsContext scriptFields()
scriptFields
in class SearchContext
public boolean sourceRequested()
SearchContext
sourceRequested
in class SearchContext
public boolean hasFetchSourceContext()
hasFetchSourceContext
in class SearchContext
public FetchSourceContext fetchSourceContext()
fetchSourceContext
in class SearchContext
public SearchContext fetchSourceContext(FetchSourceContext fetchSourceContext)
fetchSourceContext
in class SearchContext
public ContextIndexSearcher searcher()
searcher
in class SearchContext
public IndexShard indexShard()
indexShard
in class SearchContext
public MapperService mapperService()
mapperService
in class SearchContext
public SimilarityService similarityService()
similarityService
in class SearchContext
public BigArrays bigArrays()
bigArrays
in class SearchContext
public BitsetFilterCache bitsetFilterCache()
bitsetFilterCache
in class SearchContext
public IndexFieldDataService fieldData()
fieldData
in class SearchContext
public TimeValue timeout()
timeout
in class SearchContext
public void timeout(TimeValue timeout)
timeout
in class SearchContext
public int terminateAfter()
terminateAfter
in class SearchContext
public void terminateAfter(int terminateAfter)
terminateAfter
in class SearchContext
public boolean lowLevelCancellation()
SearchContext
lowLevelCancellation
in class SearchContext
public SearchContext minimumScore(float minimumScore)
minimumScore
in class SearchContext
public java.lang.Float minimumScore()
minimumScore
in class SearchContext
public SearchContext sort(SortAndFormats sort)
sort
in class SearchContext
public SortAndFormats sort()
sort
in class SearchContext
public SearchContext trackScores(boolean trackScores)
trackScores
in class SearchContext
public boolean trackScores()
trackScores
in class SearchContext
public SearchContext searchAfter(org.apache.lucene.search.FieldDoc searchAfter)
searchAfter
in class SearchContext
public org.apache.lucene.search.FieldDoc searchAfter()
searchAfter
in class SearchContext
public SearchContext parsedPostFilter(ParsedQuery postFilter)
parsedPostFilter
in class SearchContext
public ParsedQuery parsedPostFilter()
parsedPostFilter
in class SearchContext
public org.apache.lucene.search.Query aliasFilter()
aliasFilter
in class SearchContext
public SearchContext parsedQuery(ParsedQuery query)
parsedQuery
in class SearchContext
public ParsedQuery parsedQuery()
parsedQuery
in class SearchContext
public org.apache.lucene.search.Query query()
SearchContext
query
in class SearchContext
public int from()
from
in class SearchContext
public SearchContext from(int from)
from
in class SearchContext
public int size()
size
in class SearchContext
public SearchContext size(int size)
size
in class SearchContext
public boolean explain()
explain
in class SearchContext
public void explain(boolean explain)
explain
in class SearchContext
public java.util.List<java.lang.String> groupStats()
groupStats
in class SearchContext
public void groupStats(java.util.List<java.lang.String> groupStats)
groupStats
in class SearchContext
public boolean version()
version
in class SearchContext
public void version(boolean version)
version
in class SearchContext
public int[] docIdsToLoad()
docIdsToLoad
in class SearchContext
public int docIdsToLoadFrom()
docIdsToLoadFrom
in class SearchContext
public int docIdsToLoadSize()
docIdsToLoadSize
in class SearchContext
public SearchContext docIdsToLoad(int[] docIdsToLoad, int docsIdsToLoadFrom, int docsIdsToLoadSize)
docIdsToLoad
in class SearchContext
public void accessed(long accessTime)
accessed
in class SearchContext
public long lastAccessTime()
lastAccessTime
in class SearchContext
public long keepAlive()
keepAlive
in class SearchContext
public void keepAlive(long keepAlive)
keepAlive
in class SearchContext
public SearchLookup lookup()
lookup
in class SearchContext
public DfsSearchResult dfsResult()
dfsResult
in class SearchContext
public QuerySearchResult queryResult()
queryResult
in class SearchContext
public FetchSearchResult fetchResult()
fetchResult
in class SearchContext
public FetchPhase fetchPhase()
fetchPhase
in class SearchContext
public MappedFieldType smartNameFieldType(java.lang.String name)
SearchContext
smartNameFieldType
in class SearchContext
public ObjectMapper getObjectMapper(java.lang.String name)
getObjectMapper
in class SearchContext
public org.apache.lucene.util.Counter timeEstimateCounter()
timeEstimateCounter
in class SearchContext
public void addSearchExt(SearchExtBuilder searchExtBuilder)
addSearchExt
in class SearchContext
public SearchExtBuilder getSearchExt(java.lang.String name)
getSearchExt
in class SearchContext
public Profilers getProfilers()
SearchContext
null
if profiling is not enabled.getProfilers
in class SearchContext
public java.util.Map<java.lang.Class<?>,org.apache.lucene.search.Collector> queryCollectors()
SearchContext
queryCollectors
in class SearchContext
public QueryShardContext getQueryShardContext()
getQueryShardContext
in class SearchContext
public void setTask(SearchTask task)
setTask
in class SearchContext
public SearchTask getTask()
getTask
in class SearchContext
public boolean isCancelled()
isCancelled
in class SearchContext
public SearchContext collapse(CollapseContext collapse)
collapse
in class SearchContext
public CollapseContext collapse()
collapse
in class SearchContext