Modifier and Type | Field and Description |
---|---|
private static QueryProfileType |
argumentType
The type representing the property arguments consumed by this
|
private static com.yahoo.processing.request.CompoundName |
argumentTypeName |
static String |
DEFAULT_INDEX |
private String |
defaultIndex |
private String |
documentDbName |
private String |
encoding |
static String |
ENCODING |
static com.yahoo.processing.request.CompoundName |
ESTIMATE
The name of the query property used for generating hit count estimate queries.
|
private Execution |
execution |
private String |
filter |
static String |
FILTER |
private com.yahoo.language.Language |
language |
static String |
LANGUAGE |
private Locale |
locale |
static String |
MODEL |
private Query |
parent |
static String |
PROGRAM |
static String |
QUERY_STRING |
private String |
queryString |
private QueryTree |
queryTree |
private Set<String> |
restrict |
static String |
RESTRICT |
static String |
SEARCH_PATH |
private String |
searchPath |
private Set<String> |
sources |
static String |
SOURCES |
private Query.Type |
type |
static String |
TYPE |
Modifier and Type | Method and Description |
---|---|
private void |
addConnectivityRankProperties(List<Item> connectedItems,
Ranking ranking) |
private void |
addLabels(List<Item> candidates,
Ranking ranking) |
private void |
addSignificances(List<Item> candidates,
Ranking ranking) |
Object |
clone() |
Model |
cloneFor(Query q) |
private void |
collectTaggableItems(Item root,
List<Item> terms) |
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() |
private com.yahoo.language.Language |
languageBelow(Item item) |
void |
prepare(Ranking ranking)
Prepares this for binary serialization.
|
private void |
prepareRankFeaturesFromModel(Ranking ranking) |
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.
|
private void |
setFromString(String string,
Set<String> set) |
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.
|
private List<Item> |
setUniqueIDs(Item root) |
void |
setYTraceHeaderToNext(String next)
Deprecated.
not used, ytrace has been discontinued
|
private boolean |
strictContains(Object needle,
Collection<?> haystack) |
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
|
private static final QueryProfileType argumentType
private static final com.yahoo.processing.request.CompoundName argumentTypeName
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
private String encoding
private String queryString
private String filter
private com.yahoo.language.Language language
private Locale locale
private QueryTree queryTree
private String defaultIndex
private Query.Type type
private Query parent
private String searchPath
private String documentDbName
private Execution execution
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)
private com.yahoo.language.Language languageBelow(Item item)
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 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)
private void prepareRankFeaturesFromModel(Ranking ranking)
private void addConnectivityRankProperties(List<Item> connectedItems, Ranking ranking)
private boolean strictContains(Object needle, Collection<?> haystack)
@Deprecated public void setYTraceHeaderToNext(String next)
next
- string representation of header value@Deprecated public String getYTraceHeaderToNext()
Copyright © 2018. All rights reserved.