@Deprecated public class VespaSearcher extends ConfiguredHTTPProviderSearcher
If the "sources" argument should be honored on an external cluster
when using YQL+, override chooseYqlSources(Set)
.
HTTPSearcher.SearcherHttpClient, HTTPSearcher.ThrowingCertificateStore
Modifier and Type | Field and Description |
---|---|
private Query.Type |
queryType
Deprecated.
|
private ThreadLocal<XMLReader> |
readerHolder
Deprecated.
|
private com.yahoo.collections.Tuple2<String,com.yahoo.component.Version> |
segmenterVersion
Deprecated.
|
private static com.yahoo.processing.request.CompoundName |
select
Deprecated.
|
private static com.yahoo.processing.request.CompoundName |
streamingGroupname
Deprecated.
|
private static com.yahoo.processing.request.CompoundName |
streamingSelection
Deprecated.
|
private static com.yahoo.processing.request.CompoundName |
streamingUserid
Deprecated.
|
cacheName, log
certificateProxy, IP_ADDRESS_UNKNOWN, LOG_CONNECT_TIMEOUT_PREFIX, LOG_HEADER_PREFIX, LOG_HITCOUNT, LOG_HOST, LOG_IP_ADDRESS, LOG_LATENCY_CONNECT, LOG_LATENCY_FINISH, LOG_LATENCY_START, LOG_PATH, LOG_PORT, LOG_PROXY_HOST, LOG_PROXY_PORT, LOG_PROXY_TYPE, LOG_QUERY_PARAM_PREFIX, LOG_READ_TIMEOUT_PREFIX, LOG_RESPONSE_HEADER_PREFIX, LOG_SCHEME, LOG_STATUS, LOG_URI, useCertificate, YCA_HTTP_HEADER
Constructor and Description |
---|
VespaSearcher(com.yahoo.component.ComponentId id,
ProviderConfig config,
QrBinaryCacheConfig c,
QrBinaryCacheRegionConfig r,
com.yahoo.statistics.Statistics statistics)
Deprecated.
Create an instance from configuration
|
VespaSearcher(com.yahoo.component.ComponentId id,
ProviderConfig config,
QrBinaryCacheConfig c,
QrBinaryCacheRegionConfig r,
com.yahoo.statistics.Statistics statistics,
com.yahoo.language.Linguistics linguistics)
Deprecated.
Create an instance from configuration
|
VespaSearcher(String idString,
String host,
int port,
String path)
Deprecated.
Create an instance from direct parameters having a single connection.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addProperty(Map<String,String> queryMap,
Query query,
com.yahoo.processing.request.CompoundName property)
Deprecated.
|
protected void |
chooseYqlSources(Set<String> sources)
Deprecated.
Choose which source arguments to use for the external cluster when
generating a YQL+ query string.
|
protected void |
chooseYqlSummaryFields(Set<String> summaryFields)
Deprecated.
Choose which summary fields to request from the external cluster when
generating a YQL+ query string.
|
Map<String,String> |
getCacheKey(Query q)
Deprecated.
|
URI |
getPingURI(Connection connection)
Deprecated.
Returns the canonical Vespa ping URI, http://host:port/status.html
|
Map<String,String> |
getQueryMap(Query query)
Deprecated.
Returns the key-value pairs that should be added as properties to the request url sent to the service.
|
private Map<String,String> |
getQueryMapWithoutHitsOffset(Query query)
Deprecated.
|
private XMLReader |
getReader()
Deprecated.
|
protected com.yahoo.collections.Tuple2<String,com.yahoo.component.Version> |
getSegmenterVersion()
Deprecated.
Get the segmenter version data used when creating YQL queries.
|
String |
marshalQuery(Query query)
Deprecated.
Serialize the query parameter for outgoing queries.
|
String |
marshalQuery(QueryTree root)
Deprecated.
|
private String |
marshalRoot(Item root)
Deprecated.
|
(package private) Query.Type |
toQueryType(ProviderConfig.QueryType.Enum providerQueryType)
Deprecated.
|
void |
unmarshal(InputStream stream,
long contentLength,
Result result)
Deprecated.
Unmarshal the stream by converting it to hits and adding the hits to the given result.
|
fill
addNonExcludedSourceProperties, configureCache, inspectAndReturnFinalResult, logResponseLatency, search, unmarshal
checkPing, cleanupHttpEntity, createClient, createMalformedUrlError, createRequest, createRequest, createRequestMeta, getConnectionManager, getEntity, getEntity, getParameters, getPath, getPingPath, getRequestEntity, getRequestHeaders, getResponse, getResponse, getResponse, getResponse, getURI, getURI, ping, shutdownConnectionManagers
deconstruct, failed, fill, getFirstConnection, getHasher, getMonitor, log, ping, robustSearch, search, search, shouldRetry, timedOut, working
ping
ensureFilled, getLogger, process, toString
getAnnotatedDependencies, getDefaultAnnotatedDependencies, getDependencies, initDependencies
clone, compareTo, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
pingIterationCompleted
private final ThreadLocal<XMLReader> readerHolder
private final Query.Type queryType
private final com.yahoo.collections.Tuple2<String,com.yahoo.component.Version> segmenterVersion
private static final com.yahoo.processing.request.CompoundName select
private static final com.yahoo.processing.request.CompoundName streamingUserid
private static final com.yahoo.processing.request.CompoundName streamingGroupname
private static final com.yahoo.processing.request.CompoundName streamingSelection
public VespaSearcher(com.yahoo.component.ComponentId id, ProviderConfig config, QrBinaryCacheConfig c, QrBinaryCacheRegionConfig r, com.yahoo.statistics.Statistics statistics)
@Inject public VespaSearcher(com.yahoo.component.ComponentId id, ProviderConfig config, QrBinaryCacheConfig c, QrBinaryCacheRegionConfig r, com.yahoo.statistics.Statistics statistics, @Nullable com.yahoo.language.Linguistics linguistics)
linguistics
- used for generating meta info for YQL+void addProperty(Map<String,String> queryMap, Query query, com.yahoo.processing.request.CompoundName property)
public Map<String,String> getQueryMap(Query query)
HTTPProviderSearcher
HTTPSearcher.getURI(com.yahoo.search.Query, com.yahoo.search.federation.http.Connection)
(from which this is called) is overridden.
This default implementation returns the query.properties() prefixed by
"source.[sourceName]" or "property.[propertyName]"
(by calling HTTPProviderSearcher.addNonExcludedSourceProperties(com.yahoo.search.Query, java.util.Map<java.lang.String, java.lang.String>)
).
getQueryMap
in class HTTPProviderSearcher
public Map<String,String> getCacheKey(Query q)
getCacheKey
in class HTTPProviderSearcher
private Map<String,String> getQueryMapWithoutHitsOffset(Query query)
Query.Type toQueryType(ProviderConfig.QueryType.Enum providerQueryType)
public String marshalQuery(Query query)
query
- the current, outgoing queryprivate XMLReader getReader()
public void unmarshal(InputStream stream, long contentLength, Result result)
HTTPProviderSearcher
unmarshal(entity,result).
Override this in subclasses which does not override unmarshal(entity,result).
This default implementation throws an exception.
unmarshal
in class HTTPProviderSearcher
stream
- the stream of data returnedcontentLength
- the length of the content in bytes if known, or a negative number if unknownresult
- the result to which unmarshalled data should be addedpublic URI getPingURI(Connection connection) throws MalformedURLException, URISyntaxException
getPingURI
in class HTTPSearcher
MalformedURLException
URISyntaxException
protected com.yahoo.collections.Tuple2<String,com.yahoo.component.Version> getSegmenterVersion()
marshalQuery(Query)
.protected void chooseYqlSources(Set<String> sources)
marshalQuery(Query)
. The default implementation clears the set,
i.e. requests all sources. Other implementations may modify the source
set as they see fit, or simply do nothing.sources
- the set of source names to use for the outgoing queryprotected void chooseYqlSummaryFields(Set<String> summaryFields)
marshalQuery(Query)
. The default implementation clears the set,
i.e. requests all fields. Other implementations may modify the summary
field set as they see fit, or simply do nothing.summaryFields
- the set of source names to use for the outgoing queryCopyright © 2018. All rights reserved.