Uses of Class
com.yahoo.search.Query
Package
Description
The main classes of the Vespa Query Result Server.
Cluster monitoring for content clusters queried over fnet.
The query model representing a boolean combination of selection criterions, where elements may be
simple criterions, nested boolean operators, or annotated pieces of natural language text.
The top level classes of the search container. A Query represents the incoming request, which produces a Result
by chained execution of a set of Searchers.
Standard searchers to compose in source search chains (those containing searchers specific for one source and
which ends with a call to some provider) which calls a cluster of provider nodes.
The federation layer on top of the search container.
The search handler, which handles search request to the Container by translating the Request into a Query, invoking the
chosen Search Chain to get a Result, which it translates to a Response which is returned to the Container.
The search query model
Vespa search platform query transformation infrastructure.
The content of a Result produced in response to a Query.
Classes for composition of searchers into search chains, which are executed to produce Results for Queries.
Various useful searchers
YQL+ integration.
-
Uses of Query in com.yahoo.prelude
-
Uses of Query in com.yahoo.prelude.cluster
-
Uses of Query in com.yahoo.prelude.fastsearch
Modifier and TypeMethodDescriptionprotected abstract Result
Searches a search cluster This is an endpoint - searchers will never propagate the search to any nested searcher.protected DocsumDefinitionSet
VespaBackEndSearcher.getDocsumDefinitionSet
(Query query) VespaBackEndSearcher.getDocumentDatabase
(Query query) boolean
VespaBackEndSearcher.summaryNeedsQuery
(Query query) Returns whether we need to send the query when fetching summaries.protected void
FastSearcher.transformQuery
(Query query) protected void
VespaBackEndSearcher.transformQuery
(Query query) -
Uses of Query in com.yahoo.prelude.query
Modifier and TypeMethodDescriptionstatic String
QueryCanonicalizer.canonicalize
(Query query) Validates this query and carries out possible operations on this query which simplifies it without changing its semantics. -
Uses of Query in com.yahoo.prelude.querytransform
Modifier and TypeMethodDescriptionstatic void
QueryRewrite.collapseSingleComposites
(Query query) Collapses all single-childCompositeItem
s into their parent item.protected void
NormalizingSearcher.normalize
(Query query, IndexFacts.Session indexFacts) static void
QueryRewrite.optimizeAndNot
(Query query) Optimize multiple NotItems under and or by collapsing them in to one and leaving the positive ones behind in its place and moving itself with the original and as its positive item and the union of all the negative items of all the original NotItems as its negative items.static void
QueryRewrite.optimizeByRestrict
(Query query) Optimizes the given query tree based on itsModel.getRestrict()
parameter, if any.static void
QueryRewrite.rewriteSddocname
(Query query) Replaces andSimpleIndexedItem
searching in theHit.SDDOCNAME_FIELD
with an item appropriate for the search node. -
Uses of Query in com.yahoo.prelude.searcher
Modifier and TypeMethodDescriptionprotected Result
BlendingSearcher.blendResults
(Result result, Query q, int offset, int hits, Execution execution) Produce a single blended hit list from a group of hitgroups.First fetch result from the next searcher in the chain.Convert Juniper style property highlighting to XML style. -
Uses of Query in com.yahoo.prelude.semantics
Modifier and TypeMethodDescriptionAnalyzes a query over this rule baseprotected void
RuleBase.annotatePhrase
(PhraseMatcher.Phrase phrase, Query query, int traceLevel) protected void
RuleBase.matchAutomata
(Query query, int traceLevel) -
Uses of Query in com.yahoo.prelude.semantics.engine
Modifier and TypeMethodDescriptionEvaluates a rule base over a queryModifierConstructorDescriptionEvaluation
(Query query, RuleBase ruleBase) Evaluation
(Query query, RuleBase ruleBase, int traceLevel) Creates a new evaluation -
Uses of Query in com.yahoo.prelude.statistics
-
Uses of Query in com.yahoo.search
Modifier and TypeMethodDescriptionQuery.Builder.build()
Creates a new query from this builder.Query.clone()
Returns a clone of this querystatic Query
Query.createNewQuery
(Query query) Creates a new query from another query, but with time sensitive fields reset.Result.getQuery()
Returns the query which produced this resultModifier and TypeMethodDescriptionvoid
Query.attachContext
(Query query) Set the context information for another query to be part of this query's context information.static Query
Query.createNewQuery
(Query query) Creates a new query from another query, but with time sensitive fields reset.abstract Result
Override this to implement your searcher.void
Sets a query for this result -
Uses of Query in com.yahoo.search.cluster
Modifier and TypeMethodDescriptionprotected T
ClusterSearcher.getFirstConnection
(Hasher.NodeList<T> nodes, int code, int trynum, Query query) protected Result
ClusterSearcher.robustSearch
(Query query, Execution execution, T connection) Call search(Query, Execution, T) and handle any exceptions returned which we do not want to propagate upwards By default this catches all runtime exceptions and puts them into the resultfinal Result
protected Result
ClusterSearcher.search
(Query query, Execution execution, ErrorMessage message) This is called (instead of search(query, execution, connection) to handle searches where no (suitable) backend was available.protected abstract Result
Perform the search against the given connection.protected boolean
ClusterSearcher.shouldRetry
(Query query, Result result) Returns whether this query and result should be retried against another connection if possible.protected boolean
Returns true if this query has timed out now -
Uses of Query in com.yahoo.search.dispatch
Modifier and TypeMethodDescriptionprotected abstract Optional<SearchInvoker>
InvokerFactory.createNodeSearchInvoker
(VespaBackEndSearcher searcher, Query query, int maxHits, Node node) protected InvokerResult
SearchInvoker.errorResult
(Query query, ErrorMessage errorMessage) Dispatcher.getSearchInvoker
(Query query, VespaBackEndSearcher searcher) Retrieve the hits for the givenQuery
.protected Object
InterleavedSearchInvoker.sendSearchRequest
(Query query, Object unusedContext) Sends search queries to the containedSearchInvoker
sub-invokers.protected Object
SearchErrorInvoker.sendSearchRequest
(Query query, Object context) protected abstract Object
SearchInvoker.sendSearchRequest
(Query query, Object context) -
Uses of Query in com.yahoo.search.dispatch.rpc
Modifier and TypeMethodDescriptioncom.yahoo.compress.Compressor.Compression
protected Optional<SearchInvoker>
RpcInvokerFactory.createNodeSearchInvoker
(VespaBackEndSearcher searcher, Query query, int maxHits, Node node) static int
ProtobufSerialization.getTraceLevelForBackend
(Query query) protected Object
RpcSearchInvoker.sendSearchRequest
(Query query, Object incomingContext) -
Uses of Query in com.yahoo.search.federation
Modifier and TypeMethodDescriptionstatic Properties
FederationSearcher.getSourceProperties
(Query query) Returns the set of properties set for the source or provider given in the query (if any). -
Uses of Query in com.yahoo.search.federation.selection
Modifier and TypeMethodDescriptionTargetSelector.getTargets
(Query query, com.yahoo.processing.execution.chain.ChainRegistry<Searcher> searcherChainRegistry) void
TargetSelector.modifyTargetQuery
(FederationTarget<T> target, Query query) For modifying the query before sending it to a the target -
Uses of Query in com.yahoo.search.grouping
Modifier and TypeMethodDescriptionstatic void
GroupingQueryParser.createGroupingRequestIn
(Query query, GroupingOperation operation, List<Continuation> continuations) static GroupingRequest
GroupingRequest.newInstance
(Query query) Creates a new grouping request and adds it to the query.getSelect().getGrouping() listImplements the deprecated "unique" api for deduplication by using grouping.static void
-
Uses of Query in com.yahoo.search.grouping.result
-
Uses of Query in com.yahoo.search.grouping.vespa
Modifier and TypeMethodDescriptionstatic List<com.yahoo.searchlib.aggregation.Grouping>
GroupingExecutor.getGroupingList
(Query query) Returns the list ofGrouping
objects assigned to the given query.static boolean
GroupingExecutor.hasGroupingList
(Query query) static void
GroupingExecutor.setGroupingList
(Query query, List<com.yahoo.searchlib.aggregation.Grouping> list) Sets the list ofGrouping
objects assigned to the given query. -
Uses of Query in com.yahoo.search.handler
Modifier and TypeMethodDescriptionHttpSearchResponse.getQuery()
Returns the query wrapped by thisModifier and TypeMethodDescriptionstatic CompletableFuture<Boolean>
HttpSearchResponse.asyncRender
(Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer, OutputStream stream) static com.yahoo.container.logging.HitCounts
SearchResponse.createHitCounts
(Query query, Result result) static com.yahoo.container.handler.Timing
SearchResponse.createTiming
(Query query, Result result) SearchHandler.searchAndFill
(Query query, com.yahoo.component.chain.Chain<? extends Searcher> searchChain) Used from container SDK, for internal use onlyModifierConstructorDescriptionHttpSearchResponse
(int status, Result result, Query query, com.yahoo.processing.rendering.Renderer<Result> renderer) -
Uses of Query in com.yahoo.search.intent.model
Modifier and TypeMethodDescriptionstatic IntentModel
Returns the intent model stored at property key "intentModel" in this query, or null if nonevoid
Stores this intent model at property key "intentModel" in this query -
Uses of Query in com.yahoo.search.match
-
Uses of Query in com.yahoo.search.pagetemplates
-
Uses of Query in com.yahoo.search.pagetemplates.engine
Modifier and TypeMethodDescriptionOverride this to resolve choices.void
Resolver.resolve
(Choice choice, Query query, Result result, Resolution resolution) Override this to resolve each choice independently.void
Resolver.resolve
(MapChoice choice, Query query, Result result, Resolution resolution) Override this to resolve each map choice independently. -
Uses of Query in com.yahoo.search.pagetemplates.engine.resolvers
Modifier and TypeMethodDescriptionvoid
DeterministicResolver.resolve
(Choice choice, Query query, Result result, Resolution resolution) Chooses the last alternative of any choicevoid
DeterministicResolver.resolve
(MapChoice choice, Query query, Result result, Resolution resolution) Chooses a mapping which is always by the literal order given in the source templatevoid
RandomResolver.resolve
(Choice choice, Query query, Result result, Resolution resolution) Chooses the last alternative of any choicevoid
RandomResolver.resolve
(MapChoice choice, Query query, Result result, Resolution resolution) Chooses a mapping which is always by the literal order given in the source template -
Uses of Query in com.yahoo.search.pagetemplates.result
Modifier and TypeMethodDescriptionfinal String
PageTemplatesXmlRenderer.getRequestedEncoding
(Query query) Returns the encoding of the query, or the encoding given by the template if none is set -
Uses of Query in com.yahoo.search.query
Modifier and TypeMethodDescriptionModel.getParent()
Returns the query owning this, never nullRanking.getParent()
Returns the query owning this, never nullProperties.getParentQuery()
Returns the query owning this property object.Modifier and TypeMethodDescriptionstatic Model
static Ranking
void
Assigns the query owning thisvoid
Properties.setParentQuery
(Query query) Invoked during deep cloning of the parent query. -
Uses of Query in com.yahoo.search.query.context
-
Uses of Query in com.yahoo.search.query.properties
ModifierConstructorDescriptionQueryProperties
(Query query, CompiledQueryProfileRegistry profileRegistry, Map<String, com.yahoo.language.process.Embedder> embedders) RankProfileInputProperties
(SchemaInfo schemaInfo, Query query, Map<String, com.yahoo.language.process.Embedder> embedders) -
Uses of Query in com.yahoo.search.query.rewrite
Modifier and TypeMethodDescriptionstatic Query
RewriterFeatures.addExpansions
(Query query, Set<PhraseMatcher.Phrase> matches, String expandIndex, int maxNumRewrites, boolean removeOriginal, boolean addUnitToRewrites) Add Expansions to the matching phrasesstatic Query
RewriterFeatures.addRewritesAsEquiv
(Query query, String matchingStr, String rewrites, boolean addUnitToRewrites, int maxNumRewrites) Add query expansion to the query treestatic Query
RewriterFeatures.addUnitToOriginalQuery
(Query query, String boostingQuery, boolean keepOriginalQuery) Add proximity boosting to original query by modifying the query tree directlyModifier and TypeMethodDescriptionstatic Query
RewriterFeatures.addExpansions
(Query query, Set<PhraseMatcher.Phrase> matches, String expandIndex, int maxNumRewrites, boolean removeOriginal, boolean addUnitToRewrites) Add Expansions to the matching phrasesstatic Query
RewriterFeatures.addRewritesAsEquiv
(Query query, String matchingStr, String rewrites, boolean addUnitToRewrites, int maxNumRewrites) Add query expansion to the query treestatic Query
RewriterFeatures.addUnitToOriginalQuery
(Query query, String boostingQuery, boolean keepOriginalQuery) Add proximity boosting to original query by modifying the query tree directlystatic void
Print error messagestatic Set<PhraseMatcher.Phrase>
RewriterFeatures.getNonOverlappingFullPhraseMatches
(PhraseMatcher phraseMatcher, Query query) Retrieve the longest, from left to right non overlapping full phrase substrings in query based on FSA dictionarystatic List<PhraseMatcher.Phrase>
RewriterFeatures.getNonOverlappingMatchesInAndItem
(List<PhraseMatcher.Phrase> allMatches, Query query) Retrieve the longest, from left to right non overlapping substrings in AndItem based on FSA dictionarystatic Set<PhraseMatcher.Phrase>
RewriterFeatures.getNonOverlappingPartialPhraseMatches
(PhraseMatcher phraseMatcher, Query query) Retrieve the longest, from left to right non overlapping partial phrase substrings in query based on FSA dictionarystatic String
RewriterUtils.getNormalizedOriginalQuery
(Query query) Retrieve normalized original query from query objectprotected String
QueryRewriteSearcher.getQPConfig
(Query query, String paramName) Get config parameter value set in query profilestatic String
RewriterUtils.getQPConfig
(Query query, String rewriterName, String paramName) Get config parameter value set in query profileprotected String
QueryRewriteSearcher.getRewriteFromFSA
(Query query, String dictName, String key) Retrieve rewrite from FSA given the original querystatic String
RewriterUtils.getRewriteFromFSA
(Query query, HashMap<String, Object> rewriterDicts, String dictName, String key) Retrieve rewrite from FSA given the original queryRewriterUtils.getRewriteMeta
(Query query) Retrieve metadata passed by previous rewriter from query properties Initialize values if this is the first rewriterstatic String
RewriterUtils.getRewriterChain
(Query query) Get rewriter chain valuestatic String
RewriterUtils.getSpellCorrected
(Query query, boolean qss_rw, boolean qss_sugg) Retrieve spell corrected query with highest score from QLASstatic String
RewriterUtils.getUserParam
(Query query, String paramName) Get user param valuestatic com.yahoo.fsa.FSA
Load FSA from filestatic com.yahoo.fsa.FSA
Load FSA from filestatic void
Log messagePerform the main rewrite logicPerform main rewrite logics for this searcher
- Skip to next rewriter if query is previously rewritten and getSkipRewriterIfRewritten() is true for this rewriter
- Execute rewriter's main rewrite logic
- Pass to the next rewriter the query to be used for dictionary retrievalExecute another search chain specified by the user
- Retrieve search chain specified by the user through param
- Execute specified search chain if existstatic void
RewriterUtils.setRewriteMeta
(Query query, HashMap<String, Object> metadata) Pass metadata to the next rewriter through query properties -
Uses of Query in com.yahoo.search.query.rewrite.rewriters
Modifier and TypeMethodDescriptionMain logic of rewriter
- Retrieve rewrites from FSA dict
- rewrite query using features that are enabled by userMain logic of rewriter
- Retrieve spell corrected query from QLAS
- Add spell corrected query as equivMain logic of rewriter
- Retrieve rewrites from FSA dict
- rewrite query using features that are enabled by user -
Uses of Query in com.yahoo.search.querytransform
Modifier and TypeMethodDescriptionprotected CompositeItem
NGramSearcher.createGramRoot
(HasIndexItem term, Query query) Creates the root of the query subtree which will contain the grams to match, called byNGramSearcher.splitToGrams(com.yahoo.prelude.query.Item, java.lang.String, int, com.yahoo.search.Query)
.protected CompositeItem
NGramSearcher.createGramRoot
(Query query) Creates the root of the query subtree without access to the term being replaced.protected Item
NGramSearcher.splitToGrams
(Item term, String text, int gramSize, Query query) Splits the given item into n-grams and adds them as a CompositeItem containing WordItems searching the index of the input term. -
Uses of Query in com.yahoo.search.rendering
Modifier and TypeMethodDescriptionfinal String
Renderer.getRequestedEncoding
(Query query) Returns the encoding of the query, or the encoding given by the template if none is setfinal String
XmlRenderer.getRequestedEncoding
(Query query) Returns the encoding of the query, or the encoding given by the template if none is setvoid
SyncDefaultRenderer.queryContext
(com.yahoo.text.XMLWriter writer, QueryContext queryContext, Query owner) void
XmlRenderer.queryContext
(com.yahoo.text.XMLWriter writer, QueryContext queryContext, Query owner) -
Uses of Query in com.yahoo.search.result
Modifier and TypeMethodDescriptionHit.getQuery()
Returns the query which produced this hit, or null if not knownModifier and TypeMethodDescriptionfinal void
Sets the query which produced this.ModifierConstructorDescriptionCreates a minimal valid hit.Creates a hit.Creates a minimal valid hit having relevance 1Creates a minimal valid hit.Creates a hit. -
Uses of Query in com.yahoo.search.schema
-
Uses of Query in com.yahoo.search.searchchain
Modifier and TypeMethodDescriptionFutureResult.getQuery()
Returns the query used in this execution, never nullModifier and TypeMethodDescriptionDoes an async search, note that the query argument cannot simultaneously be used to execute any other searches, a clone() must be made of the query for each async execution if the same query is to be used in more than one.Calls search on the next searcher in this chain.AsyncExecution.searchAndFill
(Query query) ModifierConstructorDescriptionFutureResult
(Callable<Result> callable, Execution execution, Query query) -
Uses of Query in com.yahoo.search.searchchain.example
-
Uses of Query in com.yahoo.search.searchchain.testutil
-
Uses of Query in com.yahoo.search.searchers
Modifier and TypeMethodDescription -
Uses of Query in com.yahoo.search.yql
Modifier and TypeMethodDescriptionstatic String
static String
void
YqlParser.setUserQuery
(Query userQuery) -
Uses of Query in com.yahoo.vespa.streamingvisitors