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, tryIncRef
public 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 SearchContext
public 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 SearchContext
public void highlight(SearchContextHighlight highlight)
highlight
in class SearchContext
public SearchShardTarget shardTarget()
shardTarget
in class SearchContext
public SearchLookup lookup()
lookup
in class SearchContext
protected void doClose()
doClose
in class SearchContext
public MapperService mapperService()
mapperService
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 String[] types()
types
in class SearchContext
public void types(String[] types)
public IndexFieldDataService fieldData()
fieldData
in class SearchContext
public SearchContextAggregations aggregations()
aggregations
in class SearchContext
public SearchContext aggregations(SearchContextAggregations aggregations)
aggregations
in class SearchContext
public <SubPhaseContext extends FetchSubPhaseContext> SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory<SubPhaseContext> contextFactory)
getFetchSubPhaseContext
in class SearchContext
public void preProcess()
SearchContext
preProcess
in class SearchContext
public org.apache.lucene.search.Query searchFilter(String[] types)
searchFilter
in class SearchContext
public long id()
id
in class SearchContext
public String source()
source
in class SearchContext
public ShardSearchRequest request()
request
in class SearchContext
public SearchType searchType()
searchType
in class SearchContext
public SearchContext searchType(SearchType searchType)
searchType
in class SearchContext
public int numberOfShards()
numberOfShards
in class SearchContext
public boolean hasTypes()
hasTypes
in class SearchContext
public float queryBoost()
queryBoost
in class SearchContext
public SearchContext queryBoost(float queryBoost)
queryBoost
in class SearchContext
public long getOriginNanoTime()
getOriginNanoTime
in class SearchContext
protected long nowInMillisImpl()
nowInMillisImpl
in class SearchContext
public ScrollContext scrollContext()
scrollContext
in class SearchContext
public SearchContext scrollContext(ScrollContext scroll)
scrollContext
in class SearchContext
public SuggestionSearchContext suggest()
suggest
in class SearchContext
public void suggest(SuggestionSearchContext suggest)
suggest
in class SearchContext
public 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 AnalysisService analysisService()
analysisService
in class SearchContext
public IndexQueryParserService queryParserService()
queryParserService
in class SearchContext
public SimilarityService similarityService()
similarityService
in class SearchContext
public ScriptService scriptService()
scriptService
in class SearchContext
public PageCacheRecycler pageCacheRecycler()
pageCacheRecycler
in class SearchContext
public BigArrays bigArrays()
bigArrays
in class SearchContext
public BitsetFilterCache bitsetFilterCache()
bitsetFilterCache
in class SearchContext
public long timeoutInMillis()
timeoutInMillis
in class SearchContext
public void timeoutInMillis(long timeoutInMillis)
timeoutInMillis
in class SearchContext
public int terminateAfter()
terminateAfter
in class SearchContext
public void terminateAfter(int terminateAfter)
terminateAfter
in class SearchContext
public SearchContext minimumScore(float minimumScore)
minimumScore
in class SearchContext
public Float minimumScore()
minimumScore
in class SearchContext
public SearchContext sort(org.apache.lucene.search.Sort sort)
sort
in class SearchContext
public org.apache.lucene.search.Sort sort()
sort
in class SearchContext
public SearchContext trackScores(boolean trackScores)
trackScores
in class SearchContext
public boolean trackScores()
trackScores
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 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 hasFieldNames()
hasFieldNames
in class SearchContext
public List<String> fieldNames()
fieldNames
in class SearchContext
public void emptyFieldNames()
emptyFieldNames
in class SearchContext
public boolean explain()
explain
in class SearchContext
public void explain(boolean explain)
explain
in class SearchContext
public List<String> groupStats()
groupStats
in class SearchContext
public void groupStats(List<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 DfsSearchResult dfsResult()
dfsResult
in class SearchContext
public QuerySearchResult queryResult()
queryResult
in class SearchContext
public FetchSearchResult fetchResult()
fetchResult
in class SearchContext
public ScanContext scanContext()
scanContext
in class SearchContext
public MappedFieldType smartNameFieldType(String name)
smartNameFieldType
in class SearchContext
public MappedFieldType smartNameFieldTypeFromAnyType(String name)
SearchContext
smartNameFieldTypeFromAnyType
in class SearchContext
public ObjectMapper getObjectMapper(String name)
getObjectMapper
in class SearchContext
public org.apache.lucene.util.Counter timeEstimateCounter()
timeEstimateCounter
in class SearchContext
public InnerHitsContext innerHits()
innerHits
in class SearchContext
public <V> V putInContext(Object key, Object value)
HasContext
putInContext
in interface HasContext
putInContext
in class DelegatingHasContextAndHeaders
null
if there was none.public void putAllInContext(com.carrotsearch.hppc.ObjectObjectAssociativeContainer<Object,Object> map)
HasContext
putAllInContext
in interface HasContext
putAllInContext
in class DelegatingHasContextAndHeaders
public <V> V getFromContext(Object key)
getFromContext
in interface HasContext
getFromContext
in class DelegatingHasContextAndHeaders
HasContext.putInContext(Object, Object)
public <V> V getFromContext(Object key, V defaultValue)
getFromContext
in interface HasContext
getFromContext
in class DelegatingHasContextAndHeaders
defaultValue
- 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)
HasContext
hasInContext
in interface HasContext
hasInContext
in class DelegatingHasContextAndHeaders
public int contextSize()
contextSize
in interface HasContext
contextSize
in class DelegatingHasContextAndHeaders
public boolean isContextEmpty()
HasContext
isContextEmpty
in interface HasContext
isContextEmpty
in class DelegatingHasContextAndHeaders
public ImmutableOpenMap<Object,Object> getContext()
getContext
in interface HasContext
getContext
in class DelegatingHasContextAndHeaders
public void copyContextFrom(HasContext other)
HasContext
copyContextFrom
in interface HasContext
copyContextFrom
in class DelegatingHasContextAndHeaders
public <V> void putHeader(String key, V value)
putHeader
in interface HasHeaders
putHeader
in class DelegatingHasContextAndHeaders
public <V> V getHeader(String key)
getHeader
in interface HasHeaders
getHeader
in class DelegatingHasContextAndHeaders
public boolean hasHeader(String key)
hasHeader
in interface HasHeaders
hasHeader
in class DelegatingHasContextAndHeaders
public Set<String> getHeaders()
getHeaders
in interface HasHeaders
getHeaders
in class DelegatingHasContextAndHeaders
public void copyHeadersFrom(HasHeaders from)
copyHeadersFrom
in interface HasHeaders
copyHeadersFrom
in class DelegatingHasContextAndHeaders
public void copyContextAndHeadersFrom(HasContextAndHeaders other)
HasContextAndHeaders
copyContextAndHeadersFrom
in interface HasContextAndHeaders
copyContextAndHeadersFrom
in class DelegatingHasContextAndHeaders
other
- another object supporting headers and contextpublic Map<Class<?>,org.apache.lucene.search.Collector> queryCollectors()
SearchContext
queryCollectors
in class SearchContext
public Profilers getProfilers()
SearchContext
null
if profiling is not enabled.getProfilers
in class SearchContext
Copyright © 2009–2016. All rights reserved.