public class QueryShardContext extends QueryRewriteContext
client, clusterState, reader, scriptService
Constructor and Description |
---|
QueryShardContext(IndexSettings indexSettings,
BitsetFilterCache bitsetFilterCache,
IndexFieldDataService indexFieldDataService,
MapperService mapperService,
SimilarityService similarityService,
ScriptService scriptService,
IndicesQueriesRegistry indicesQueriesRegistry,
Client client,
org.apache.lucene.index.IndexReader reader,
ClusterState clusterState) |
QueryShardContext(QueryShardContext source) |
Modifier and Type | Method and Description |
---|---|
void |
addNamedQuery(java.lang.String name,
org.apache.lucene.search.Query query) |
org.apache.lucene.search.join.BitSetProducer |
bitsetFilter(org.apache.lucene.search.Query filter) |
java.util.Map<java.lang.String,org.apache.lucene.search.Query> |
copyNamedQueries() |
java.lang.String |
defaultField() |
MappedFieldType |
fieldMapper(java.lang.String name) |
AnalysisService |
getAnalysisService() |
<IFD extends IndexFieldData<?>> |
getForField(MappedFieldType mapper) |
ObjectMapper |
getObjectMapper(java.lang.String name) |
org.apache.lucene.analysis.Analyzer |
getSearchAnalyzer(MappedFieldType fieldType)
Gets the search analyzer for the given field, or the default if there is none present for the field
TODO: remove this by moving defaults into mappers themselves
|
org.apache.lucene.analysis.Analyzer |
getSearchQuoteAnalyzer(MappedFieldType fieldType)
Gets the search quote analyzer for the given field, or the default if there is none present for the field
TODO: remove this by moving defaults into mappers themselves
|
org.apache.lucene.search.similarities.Similarity |
getSearchSimilarity() |
java.lang.String[] |
getTypes() |
Index |
index() |
Version |
indexVersionCreated() |
boolean |
isFilter()
Return whether we are currently parsing a filter or a query.
|
SearchLookup |
lookup() |
boolean |
matchesIndices(java.lang.String... indices) |
NestedScope |
nestedScope() |
long |
nowInMillis() |
MapperQueryParser |
queryParser(QueryParserSettings settings) |
boolean |
queryStringAllowLeadingWildcard() |
boolean |
queryStringAnalyzeWildcard() |
boolean |
queryStringLenient() |
java.util.Collection<java.lang.String> |
queryTypes()
Returns the narrowed down explicit types, or, if not set, all types.
|
void |
setAllowUnmappedFields(boolean allowUnmappedFields) |
void |
setIsFilter(boolean isFilter)
Public for testing only!
Sets whether we are currently parsing a filter or a query
|
void |
setMapUnmappedFieldAsString(boolean mapUnmappedFieldAsString) |
void |
setTypes(java.lang.String... types) |
java.util.Collection<java.lang.String> |
simpleMatchToIndexNames(java.lang.String pattern) |
ParsedQuery |
toFilter(QueryBuilder queryBuilder) |
ParsedQuery |
toQuery(QueryBuilder queryBuilder) |
getClient, getClusterState, getIndexReader, getIndexSettings, getMapperService, getParseFieldMatcher, getScriptService, newParseContext
public QueryShardContext(IndexSettings indexSettings, BitsetFilterCache bitsetFilterCache, IndexFieldDataService indexFieldDataService, MapperService mapperService, SimilarityService similarityService, ScriptService scriptService, IndicesQueriesRegistry indicesQueriesRegistry, Client client, org.apache.lucene.index.IndexReader reader, ClusterState clusterState)
public QueryShardContext(QueryShardContext source)
public void setTypes(java.lang.String... types)
public java.lang.String[] getTypes()
public AnalysisService getAnalysisService()
public org.apache.lucene.search.similarities.Similarity getSearchSimilarity()
public java.lang.String defaultField()
public boolean queryStringLenient()
public boolean queryStringAnalyzeWildcard()
public boolean queryStringAllowLeadingWildcard()
public MapperQueryParser queryParser(QueryParserSettings settings)
public org.apache.lucene.search.join.BitSetProducer bitsetFilter(org.apache.lucene.search.Query filter)
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType mapper)
public void addNamedQuery(java.lang.String name, org.apache.lucene.search.Query query)
public java.util.Map<java.lang.String,org.apache.lucene.search.Query> copyNamedQueries()
public boolean isFilter()
public void setIsFilter(boolean isFilter)
public java.util.Collection<java.lang.String> simpleMatchToIndexNames(java.lang.String pattern)
public MappedFieldType fieldMapper(java.lang.String name)
public ObjectMapper getObjectMapper(java.lang.String name)
public org.apache.lucene.analysis.Analyzer getSearchAnalyzer(MappedFieldType fieldType)
public org.apache.lucene.analysis.Analyzer getSearchQuoteAnalyzer(MappedFieldType fieldType)
public void setAllowUnmappedFields(boolean allowUnmappedFields)
public void setMapUnmappedFieldAsString(boolean mapUnmappedFieldAsString)
public java.util.Collection<java.lang.String> queryTypes()
public SearchLookup lookup()
public long nowInMillis()
public NestedScope nestedScope()
public Version indexVersionCreated()
public boolean matchesIndices(java.lang.String... indices)
public ParsedQuery toFilter(QueryBuilder queryBuilder)
public ParsedQuery toQuery(QueryBuilder queryBuilder)
public final Index index()