Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_INDEX |
static String |
ENCODING |
static com.yahoo.processing.request.CompoundName |
ESTIMATE
The name of the query property used for generating hit count estimate queries.
|
static String |
FILTER |
static String |
LANGUAGE |
static String |
MODEL |
static String |
PROGRAM |
static String |
QUERY_STRING |
static String |
RESTRICT |
static String |
SEARCH_PATH |
static String |
SOURCES |
static String |
TYPE |
Modifier and Type | Method and Description |
---|---|
void |
clearQueryTree()
Clears the parsed query such that it will be created anew from the textual representation (a query string or
select.where expression) on the next access.
|
Object |
clone() |
Model |
cloneFor(Query q) |
boolean |
equals(Object o) |
static QueryProfileType |
getArgumentType() |
String |
getDefaultIndex()
Returns the default index for this query.
|
String |
getDocumentDb()
Returns the name of the document db this should search, or null if not set.
|
String |
getEncoding()
Returns the encoding used in the query as a lowercase string
|
Execution |
getExecution()
Returns the Execution working on this, or a null execution if none.
|
String |
getFilter()
Returns the filter string set for this query.
|
static Model |
getFrom(Query q) |
com.yahoo.language.Language |
getLanguage()
Returns the explicitly set parsing language of this query model, or null if none
|
Locale |
getLocale()
Returns the explicitly set parsing locale of this query model, or null if none.
|
Query |
getParent()
returns the query owning this, never null
|
com.yahoo.language.Language |
getParsingLanguage() |
com.yahoo.language.Language |
getParsingLanguage(String languageDetectionText)
Gets the language to use for parsing.
|
String |
getQueryString()
Returns the query string which caused the original query tree of this model to come about.
|
QueryTree |
getQueryTree()
Returns the query as an object structure.
|
Set<String> |
getRestrict()
Returns the set of types this query will search.
|
String |
getSearchPath() |
Set<String> |
getSources()
Returns the set of sources this query will search.
|
Query.Type |
getType()
Sets the query type of for this query.
|
String |
getYTraceHeaderToNext()
Deprecated.
not used, ytrace has been discontinued
|
int |
hashCode() |
void |
prepare(Ranking ranking)
Prepares this for binary serialization.
|
void |
setDefaultIndex(String defaultIndex)
Sets the default index for this query.
|
void |
setDocumentDb(String documentDbName)
Sets the document database this will search - a document type
|
void |
setEncoding(String encoding)
Sets the encoding which was used in the received query string
|
void |
setExecution(Execution execution)
Sets the execution working on this.
|
void |
setFilter(String filter)
Sets the filter string set for this query.
|
void |
setLanguage(com.yahoo.language.Language language)
Explicitly sets the language to be used during parsing
|
void |
setLanguage(String language)
Explicitly sets the language to be used during parsing.
|
void |
setLocale(Locale locale)
Explicitly sets the locale to be used during parsing.
|
void |
setLocale(String languageTag)
Explicitly sets the locale to be used during parsing.
|
void |
setParent(Query parent)
Assigns the query owning this
|
void |
setQueryString(String queryString)
Set the query from a string.
|
void |
setRestrict(String restrictString)
Sets the set of types (document type or search definition names) this query will search from a
comma-separated string of type names.
|
void |
setSearchPath(String searchPath)
Set the path for which backend nodes to forward the search too.
|
void |
setSources(String sourceString)
Sets the set of sources this query will search from a comma-separated string of source names
|
void |
setType(Query.Type type)
Sets the query type of for this query.
|
void |
setType(String typeString)
Sets the query type of for this query.
|
void |
setYTraceHeaderToNext(String next)
Deprecated.
not used, ytrace has been discontinued
|
String |
toString() |
void |
traceLanguage()
Deprecated.
do not use; language can now be assigned later and for parts of the query tree, making this quite useless
|
public static final String MODEL
public static final String PROGRAM
public static final String QUERY_STRING
public static final String TYPE
public static final String FILTER
public static final String DEFAULT_INDEX
public static final String LANGUAGE
public static final String ENCODING
public static final String SOURCES
public static final String SEARCH_PATH
public static final String RESTRICT
public static final com.yahoo.processing.request.CompoundName ESTIMATE
public Model(Query query)
public static QueryProfileType getArgumentType()
@Deprecated public void traceLanguage()
Execution.search(Query)
. If tracing the same place as
creating the query instance, setExecution(Execution)
has to be
invoked first with the same Execution instance the query is intended to
be run by.public com.yahoo.language.Language getParsingLanguage()
public com.yahoo.language.Language getParsingLanguage(String languageDetectionText)
public com.yahoo.language.Language getLanguage()
public void setLanguage(com.yahoo.language.Language language)
public void setLanguage(String language)
Explicitly sets the language to be used during parsing. The argument is first normalized by replacing
underscores with hyphens (to support locale strings being used as RFC 5646 language tags), and then forwarded to
setLocale(String)
so that the Locale information of the tag is preserved.
language
- The language string to parse.getLanguage()
,
setLocale(String)
public Locale getLocale()
Returns the explicitly set parsing locale of this query model, or null if none.
setLocale(Locale)
public void setLocale(Locale locale)
Explicitly sets the locale to be used during parsing. This method also calls setLanguage(Language)
with the corresponding Language
instance.
locale
- The locale to set.getLocale()
,
setLanguage(Language)
public void setLocale(String languageTag)
Explicitly sets the locale to be used during parsing. This creates a Locale instance from the given language
tag, and passes that to setLocale(Locale)
.
languageTag
- The language tag to parse.setLocale(Locale)
public String getEncoding()
public void setEncoding(String encoding)
public void setSearchPath(String searchPath)
public String getSearchPath()
public void setQueryString(String queryString)
Passing null causes this to be set to an empty string.
public String getQueryString()
public QueryTree getQueryTree()
public void clearQueryTree()
public String getFilter()
public void setFilter(String filter)
public String getDefaultIndex()
public void setDefaultIndex(String defaultIndex)
public Query.Type getType()
public void setType(Query.Type type)
public void setType(String typeString)
public Query getParent()
public void setParent(Query parent)
public void setSources(String sourceString)
public Set<String> getSources()
public void setRestrict(String restrictString)
public Set<String> getRestrict()
public void setExecution(Execution execution)
public void setDocumentDb(String documentDbName)
public String getDocumentDb()
public Execution getExecution()
public void prepare(Ranking ranking)
@Deprecated public void setYTraceHeaderToNext(String next)
next
- string representation of header value@Deprecated public String getYTraceHeaderToNext()
Copyright © 2018. All rights reserved.