public class QueryParseContext extends Object
Constructor and Description |
---|
QueryParseContext(Index index,
IndexQueryParserService indexQueryParser) |
Modifier and Type | Method and Description |
---|---|
void |
addInnerHits(String name,
InnerHitsContext.BaseInnerHits context) |
void |
addNamedQuery(String name,
org.apache.lucene.search.Query query) |
AnalysisService |
analysisService() |
org.apache.lucene.search.join.BitSetProducer |
bitsetFilter(org.apache.lucene.search.Query filter) |
void |
combineNamedQueries(QueryParseContext context) |
com.google.common.collect.ImmutableMap<String,org.apache.lucene.search.Query> |
copyNamedQueries() |
String |
defaultField() |
MappedFieldType |
fieldMapper(String name) |
<IFD extends IndexFieldData<?>> |
getForField(MappedFieldType mapper) |
ObjectMapper |
getObjectMapper(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 nalyzer for the given field, or the default if there is none present for the field
TODO: remove this by moving defaults into mappers themselves
|
static String[] |
getTypes() |
Index |
index() |
IndexQueryParserService |
indexQueryParserService() |
Version |
indexVersionCreated() |
boolean |
isDeprecatedSetting(String setting)
Return whether the setting is deprecated.
|
boolean |
isFilter()
Return whether we are currently parsing a filter or a query.
|
SearchLookup |
lookup() |
MapperService |
mapperService() |
NestedScope |
nestedScope() |
long |
nowInMillis() |
ParseFieldMatcher |
parseFieldMatcher() |
void |
parseFieldMatcher(ParseFieldMatcher parseFieldMatcher) |
org.apache.lucene.search.Query |
parseInnerFilter() |
org.apache.lucene.search.Query |
parseInnerFilter(String queryName) |
org.apache.lucene.search.Query |
parseInnerQuery() |
XContentParser |
parser() |
void |
parser(XContentParser parser) |
MapperQueryParser |
queryParser(QueryParserSettings settings) |
boolean |
queryStringLenient() |
Collection<String> |
queryTypes()
Returns the narrowed down explicit types, or, if not set, all types.
|
static void |
removeTypes() |
void |
reset(XContentParser jp) |
ScriptService |
scriptService() |
org.apache.lucene.search.similarities.Similarity |
searchSimilarity() |
void |
setAllowUnmappedFields(boolean allowUnmappedFields) |
void |
setMapUnmappedFieldAsString(boolean mapUnmappedFieldAsString) |
static void |
setTypes(String[] types) |
static String[] |
setTypesWithPrevious(String[] types) |
SimilarityService |
similarityService() |
Collection<String> |
simpleMatchToIndexNames(String pattern) |
public QueryParseContext(Index index, IndexQueryParserService indexQueryParser)
public static void setTypes(String[] types)
public static String[] getTypes()
public static void removeTypes()
public void parseFieldMatcher(ParseFieldMatcher parseFieldMatcher)
public ParseFieldMatcher parseFieldMatcher()
public void reset(XContentParser jp)
public Index index()
public void parser(XContentParser parser)
public XContentParser parser()
public IndexQueryParserService indexQueryParserService()
public AnalysisService analysisService()
public ScriptService scriptService()
public MapperService mapperService()
@Nullable public SimilarityService similarityService()
public org.apache.lucene.search.similarities.Similarity searchSimilarity()
public String defaultField()
public boolean queryStringLenient()
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(String name, org.apache.lucene.search.Query query)
public com.google.common.collect.ImmutableMap<String,org.apache.lucene.search.Query> copyNamedQueries()
public void combineNamedQueries(QueryParseContext context)
public boolean isFilter()
public void addInnerHits(String name, InnerHitsContext.BaseInnerHits context)
@Nullable public org.apache.lucene.search.Query parseInnerQuery() throws QueryParsingException, IOException
QueryParsingException
IOException
@Nullable public org.apache.lucene.search.Query parseInnerFilter() throws QueryParsingException, IOException
QueryParsingException
IOException
public org.apache.lucene.search.Query parseInnerFilter(String queryName) throws IOException, QueryParsingException
IOException
QueryParsingException
public Collection<String> simpleMatchToIndexNames(String pattern)
public MappedFieldType fieldMapper(String name)
public ObjectMapper getObjectMapper(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 Collection<String> queryTypes()
public SearchLookup lookup()
public long nowInMillis()
public NestedScope nestedScope()
public boolean isDeprecatedSetting(String setting)
public Version indexVersionCreated()
Copyright © 2009–2016. All rights reserved.