public class PercolateContext extends SearchContext
SearchContext.Lifetime| Modifier and Type | Field and Description |
|---|---|
boolean |
doSort |
boolean |
limit |
byte |
percolatorTypeId |
DEFAULT_TERMINATE_AFTER, parseFieldMatcher| Constructor and Description |
|---|
PercolateContext(PercolateShardRequest request,
SearchShardTarget searchShardTarget,
IndexShard indexShard,
IndexService indexService,
PageCacheRecycler pageCacheRecycler,
BigArrays bigArrays,
ScriptService scriptService,
org.apache.lucene.search.Query aliasFilter,
ParseFieldMatcher parseFieldMatcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
accessed(long accessTime) |
void |
addRescore(RescoreSearchContext rescore) |
SearchContextAggregations |
aggregations() |
SearchContext |
aggregations(SearchContextAggregations aggregations) |
org.apache.lucene.search.Query |
aliasFilter() |
AnalysisService |
analysisService() |
BigArrays |
bigArrays() |
BitsetFilterCache |
bitsetFilterCache() |
int |
contextSize() |
void |
copyContextAndHeadersFrom(HasContextAndHeaders other)
copies over the context and the headers
|
void |
copyContextFrom(HasContext other)
Copies the context from the given context holder to this context holder.
|
void |
copyHeadersFrom(HasHeaders from) |
DfsSearchResult |
dfsResult() |
int[] |
docIdsToLoad() |
SearchContext |
docIdsToLoad(int[] docIdsToLoad,
int docsIdsToLoadFrom,
int docsIdsToLoadSize) |
int |
docIdsToLoadFrom() |
int |
docIdsToLoadSize() |
protected void |
doClose() |
org.apache.lucene.search.IndexSearcher |
docSearcher() |
void |
emptyFieldNames() |
boolean |
explain() |
void |
explain(boolean explain) |
FetchSearchResult |
fetchResult() |
FetchSourceContext |
fetchSourceContext() |
SearchContext |
fetchSourceContext(FetchSourceContext fetchSourceContext) |
IndexFieldDataService |
fieldData() |
List<String> |
fieldNames() |
int |
from() |
SearchContext |
from(int from) |
ImmutableOpenMap<Object,Object> |
getContext() |
<SubPhaseContext extends FetchSubPhaseContext> |
getFetchSubPhaseContext(FetchSubPhase.ContextFactory<SubPhaseContext> contextFactory) |
<V> V |
getFromContext(Object key) |
<V> V |
getFromContext(Object key,
V defaultValue) |
<V> V |
getHeader(String key) |
Set<String> |
getHeaders() |
ObjectMapper |
getObjectMapper(String name) |
long |
getOriginNanoTime() |
Profilers |
getProfilers()
Return a handle over the profilers for the current search request, or
null if profiling is not enabled. |
List<String> |
groupStats() |
void |
groupStats(List<String> groupStats) |
boolean |
hasFetchSourceContext() |
boolean |
hasFieldNames() |
boolean |
hasHeader(String key) |
boolean |
hasInContext(Object key)
Checks if the context contains an entry with the given key
|
boolean |
hasScriptFields() |
boolean |
hasTypes() |
SearchContextHighlight |
highlight() |
void |
highlight(SearchContextHighlight highlight) |
FetchSubPhase.HitContext |
hitContext() |
long |
id() |
IndexService |
indexService() |
IndexShard |
indexShard() |
void |
initialize(Engine.Searcher docSearcher,
ParsedDocument parsedDocument) |
InnerHitsContext |
innerHits() |
boolean |
isContextEmpty()
Checks if the context is empty.
|
long |
keepAlive() |
void |
keepAlive(long keepAlive) |
long |
lastAccessTime() |
SearchLookup |
lookup() |
MapperService |
mapperService() |
Float |
minimumScore() |
SearchContext |
minimumScore(float minimumScore) |
protected long |
nowInMillisImpl() |
int |
numberOfShards() |
PageCacheRecycler |
pageCacheRecycler() |
ParsedQuery |
parsedPostFilter() |
SearchContext |
parsedPostFilter(ParsedQuery postFilter) |
ParsedQuery |
parsedQuery() |
SearchContext |
parsedQuery(ParsedQuery query) |
ConcurrentMap<org.apache.lucene.util.BytesRef,org.apache.lucene.search.Query> |
percolateQueries() |
org.apache.lucene.search.Query |
percolateQuery() |
void |
percolateQuery(org.apache.lucene.search.Query percolateQuery) |
void |
preProcess()
Should be called before executing the main query and after all other parameters have been set.
|
void |
putAllInContext(com.carrotsearch.hppc.ObjectObjectAssociativeContainer<Object,Object> map)
Attaches the given values to the context
|
<V> void |
putHeader(String key,
V value) |
<V> V |
putInContext(Object key,
Object value)
Attaches the given value to the context.
|
org.apache.lucene.search.Query |
query()
The query to execute, might be rewritten.
|
float |
queryBoost() |
SearchContext |
queryBoost(float queryBoost) |
Map<Class<?>,org.apache.lucene.search.Collector> |
queryCollectors()
Return a view of the additional query collectors that should be run for this context.
|
IndexQueryParserService |
queryParserService() |
QuerySearchResult |
queryResult() |
ShardSearchRequest |
request() |
List<RescoreSearchContext> |
rescore() |
ScanContext |
scanContext() |
ScriptFieldsContext |
scriptFields() |
ScriptService |
scriptService() |
ScrollContext |
scrollContext() |
SearchContext |
scrollContext(ScrollContext scroll) |
ContextIndexSearcher |
searcher() |
org.apache.lucene.search.Query |
searchFilter(String[] types) |
SearchType |
searchType() |
SearchContext |
searchType(SearchType searchType) |
SearchShardTarget |
shardTarget() |
SimilarityService |
similarityService() |
int |
size() |
SearchContext |
size(int size) |
MappedFieldType |
smartNameFieldType(String name) |
MappedFieldType |
smartNameFieldTypeFromAnyType(String name)
Looks up the given field, but does not restrict to fields in the types set on this context.
|
org.apache.lucene.search.Sort |
sort() |
SearchContext |
sort(org.apache.lucene.search.Sort sort) |
String |
source() |
boolean |
sourceRequested()
A shortcut function to see whether there is a fetchSourceContext and it says the source is requested.
|
SuggestionSearchContext |
suggest() |
void |
suggest(SuggestionSearchContext suggest) |
int |
terminateAfter() |
void |
terminateAfter(int terminateAfter) |
org.apache.lucene.util.Counter |
timeEstimateCounter() |
long |
timeoutInMillis() |
void |
timeoutInMillis(long timeoutInMillis) |
boolean |
trackScores() |
SearchContext |
trackScores(boolean trackScores) |
String[] |
types() |
void |
types(String[] types) |
boolean |
version() |
void |
version(boolean version) |
addReleasable, alreadyClosed, clearReleasables, close, current, decRef, incRef, nowInMillis, nowInMillisUsed, parseFieldMatcher, refCount, removeCurrent, setCurrent, tryIncRefpublic boolean limit
public boolean doSort
public byte percolatorTypeId
public PercolateContext(PercolateShardRequest request, SearchShardTarget searchShardTarget, IndexShard indexShard, IndexService indexService, PageCacheRecycler pageCacheRecycler, BigArrays bigArrays, ScriptService scriptService, org.apache.lucene.search.Query aliasFilter, ParseFieldMatcher parseFieldMatcher)
public org.apache.lucene.search.IndexSearcher docSearcher()
public void initialize(Engine.Searcher docSearcher, ParsedDocument parsedDocument)
public IndexShard indexShard()
indexShard in class SearchContextpublic IndexService indexService()
public ConcurrentMap<org.apache.lucene.util.BytesRef,org.apache.lucene.search.Query> percolateQueries()
public org.apache.lucene.search.Query percolateQuery()
public void percolateQuery(org.apache.lucene.search.Query percolateQuery)
public FetchSubPhase.HitContext hitContext()
public SearchContextHighlight highlight()
highlight in class SearchContextpublic void highlight(SearchContextHighlight highlight)
highlight in class SearchContextpublic SearchShardTarget shardTarget()
shardTarget in class SearchContextpublic SearchLookup lookup()
lookup in class SearchContextprotected void doClose()
doClose in class SearchContextpublic MapperService mapperService()
mapperService 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 String[] types()
types in class SearchContextpublic void types(String[] types)
public IndexFieldDataService fieldData()
fieldData in class SearchContextpublic SearchContextAggregations aggregations()
aggregations in class SearchContextpublic SearchContext aggregations(SearchContextAggregations aggregations)
aggregations in class SearchContextpublic <SubPhaseContext extends FetchSubPhaseContext> SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory<SubPhaseContext> contextFactory)
getFetchSubPhaseContext in class SearchContextpublic void preProcess()
SearchContextpreProcess in class SearchContextpublic org.apache.lucene.search.Query searchFilter(String[] types)
searchFilter in class SearchContextpublic long id()
id in class SearchContextpublic String source()
source in class SearchContextpublic ShardSearchRequest request()
request in class SearchContextpublic SearchType searchType()
searchType in class SearchContextpublic SearchContext searchType(SearchType searchType)
searchType in class SearchContextpublic int numberOfShards()
numberOfShards in class SearchContextpublic boolean hasTypes()
hasTypes in class SearchContextpublic float queryBoost()
queryBoost in class SearchContextpublic SearchContext queryBoost(float queryBoost)
queryBoost in class SearchContextpublic long getOriginNanoTime()
getOriginNanoTime in class SearchContextprotected long nowInMillisImpl()
nowInMillisImpl in class SearchContextpublic ScrollContext scrollContext()
scrollContext in class SearchContextpublic SearchContext scrollContext(ScrollContext scroll)
scrollContext in class SearchContextpublic SuggestionSearchContext suggest()
suggest in class SearchContextpublic void suggest(SuggestionSearchContext suggest)
suggest in class SearchContextpublic List<RescoreSearchContext> rescore()
rescore in class SearchContextpublic void addRescore(RescoreSearchContext 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 AnalysisService analysisService()
analysisService in class SearchContextpublic IndexQueryParserService queryParserService()
queryParserService in class SearchContextpublic SimilarityService similarityService()
similarityService in class SearchContextpublic ScriptService scriptService()
scriptService in class SearchContextpublic PageCacheRecycler pageCacheRecycler()
pageCacheRecycler in class SearchContextpublic BigArrays bigArrays()
bigArrays in class SearchContextpublic BitsetFilterCache bitsetFilterCache()
bitsetFilterCache in class SearchContextpublic long timeoutInMillis()
timeoutInMillis in class SearchContextpublic void timeoutInMillis(long timeoutInMillis)
timeoutInMillis in class SearchContextpublic int terminateAfter()
terminateAfter in class SearchContextpublic void terminateAfter(int terminateAfter)
terminateAfter in class SearchContextpublic SearchContext minimumScore(float minimumScore)
minimumScore in class SearchContextpublic Float minimumScore()
minimumScore in class SearchContextpublic SearchContext sort(org.apache.lucene.search.Sort sort)
sort in class SearchContextpublic org.apache.lucene.search.Sort sort()
sort in class SearchContextpublic SearchContext trackScores(boolean trackScores)
trackScores in class SearchContextpublic boolean trackScores()
trackScores 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 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 hasFieldNames()
hasFieldNames in class SearchContextpublic List<String> fieldNames()
fieldNames in class SearchContextpublic void emptyFieldNames()
emptyFieldNames in class SearchContextpublic boolean explain()
explain in class SearchContextpublic void explain(boolean explain)
explain in class SearchContextpublic List<String> groupStats()
groupStats in class SearchContextpublic void groupStats(List<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 DfsSearchResult dfsResult()
dfsResult in class SearchContextpublic QuerySearchResult queryResult()
queryResult in class SearchContextpublic FetchSearchResult fetchResult()
fetchResult in class SearchContextpublic ScanContext scanContext()
scanContext in class SearchContextpublic MappedFieldType smartNameFieldType(String name)
smartNameFieldType in class SearchContextpublic MappedFieldType smartNameFieldTypeFromAnyType(String name)
SearchContextsmartNameFieldTypeFromAnyType in class SearchContextpublic ObjectMapper getObjectMapper(String name)
getObjectMapper in class SearchContextpublic org.apache.lucene.util.Counter timeEstimateCounter()
timeEstimateCounter in class SearchContextpublic InnerHitsContext innerHits()
innerHits in class SearchContextpublic <V> V putInContext(Object key, Object value)
HasContextputInContext in interface HasContextputInContext in class DelegatingHasContextAndHeadersnull if there was none.public void putAllInContext(com.carrotsearch.hppc.ObjectObjectAssociativeContainer<Object,Object> map)
HasContextputAllInContext in interface HasContextputAllInContext in class DelegatingHasContextAndHeaderspublic <V> V getFromContext(Object key)
getFromContext in interface HasContextgetFromContext in class DelegatingHasContextAndHeadersHasContext.putInContext(Object, Object)public <V> V getFromContext(Object key, V defaultValue)
getFromContext in interface HasContextgetFromContext in class DelegatingHasContextAndHeadersdefaultValue - The default value that should be returned for the given key, if no
value is currently associated with it.HasContext.putInContext(Object, Object)public boolean hasInContext(Object key)
HasContexthasInContext in interface HasContexthasInContext in class DelegatingHasContextAndHeaderspublic int contextSize()
contextSize in interface HasContextcontextSize in class DelegatingHasContextAndHeaderspublic boolean isContextEmpty()
HasContextisContextEmpty in interface HasContextisContextEmpty in class DelegatingHasContextAndHeaderspublic ImmutableOpenMap<Object,Object> getContext()
getContext in interface HasContextgetContext in class DelegatingHasContextAndHeaderspublic void copyContextFrom(HasContext other)
HasContextcopyContextFrom in interface HasContextcopyContextFrom in class DelegatingHasContextAndHeaderspublic <V> void putHeader(String key, V value)
putHeader in interface HasHeadersputHeader in class DelegatingHasContextAndHeaderspublic <V> V getHeader(String key)
getHeader in interface HasHeadersgetHeader in class DelegatingHasContextAndHeaderspublic boolean hasHeader(String key)
hasHeader in interface HasHeadershasHeader in class DelegatingHasContextAndHeaderspublic Set<String> getHeaders()
getHeaders in interface HasHeadersgetHeaders in class DelegatingHasContextAndHeaderspublic void copyHeadersFrom(HasHeaders from)
copyHeadersFrom in interface HasHeaderscopyHeadersFrom in class DelegatingHasContextAndHeaderspublic void copyContextAndHeadersFrom(HasContextAndHeaders other)
HasContextAndHeaderscopyContextAndHeadersFrom in interface HasContextAndHeaderscopyContextAndHeadersFrom in class DelegatingHasContextAndHeadersother - another object supporting headers and contextpublic Map<Class<?>,org.apache.lucene.search.Collector> queryCollectors()
SearchContextqueryCollectors in class SearchContextpublic Profilers getProfilers()
SearchContextnull if profiling is not enabled.getProfilers in class SearchContextCopyright © 2009–2017. All rights reserved.