Class EnrichLookupService
java.lang.Object
org.elasticsearch.xpack.esql.enrich.AbstractLookupService<EnrichLookupService.Request,EnrichLookupService.TransportRequest>
org.elasticsearch.xpack.esql.enrich.EnrichLookupService
public class EnrichLookupService
extends AbstractLookupService<EnrichLookupService.Request,EnrichLookupService.TransportRequest>
EnrichLookupService performs enrich lookup for a given input page.
See AbstractLookupService for how it works where it refers to this
process as a LEFT JOIN. Which is mostly is.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static classNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.enrich.AbstractLookupService
AbstractLookupService.LookupShardContext, AbstractLookupService.LookupShardContextFactory -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.enrich.AbstractLookupService
clusterService, executor, indicesService, transportService -
Constructor Summary
ConstructorsConstructorDescriptionEnrichLookupService(ClusterService clusterService, IndicesService indicesService, AbstractLookupService.LookupShardContextFactory lookupShardContextFactory, TransportService transportService, IndexNameExpressionResolver indexNameExpressionResolver, BigArrays bigArrays, BlockFactory blockFactory, ProjectResolver projectResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.elasticsearch.xpack.esql.enrich.EnrichLookupService.LookupResponsecreateLookupResponse(List<Page> pages, BlockFactory blockFactory) Build the response.protected voidhasEnrichPrivilege(ActionListener<Void> outListener) protected LookupEnrichQueryGeneratorqueryList(EnrichLookupService.TransportRequest request, SearchExecutionContext context, AliasFilter aliasFilter, Block inputBlock, Warnings warnings) Build a list of queries to perform inside the actual lookup.protected org.elasticsearch.xpack.esql.enrich.EnrichLookupService.LookupResponsereadLookupResponse(StreamInput in, BlockFactory blockFactory) Read the response from aStreamInput.protected voidsendChildRequest(CancellableTask parentTask, ActionListener<List<Page>> delegate, DiscoveryNode targetNode, EnrichLookupService.TransportRequest transportRequest) protected EnrichLookupService.TransportRequesttransportRequest(EnrichLookupService.Request request, ShardId shardId) Convert a request as sent toAbstractLookupService.lookupAsync(R, org.elasticsearch.tasks.CancellableTask, org.elasticsearch.action.ActionListener<java.util.List<org.elasticsearch.compute.data.Page>>)into a transport request after preflight checks have been performed.Methods inherited from class org.elasticsearch.xpack.esql.enrich.AbstractLookupService
getThreadContext, lookupAsync, termQueryList
-
Field Details
-
LOOKUP_ACTION_NAME
- See Also:
-
-
Constructor Details
-
EnrichLookupService
public EnrichLookupService(ClusterService clusterService, IndicesService indicesService, AbstractLookupService.LookupShardContextFactory lookupShardContextFactory, TransportService transportService, IndexNameExpressionResolver indexNameExpressionResolver, BigArrays bigArrays, BlockFactory blockFactory, ProjectResolver projectResolver)
-
-
Method Details
-
transportRequest
protected EnrichLookupService.TransportRequest transportRequest(EnrichLookupService.Request request, ShardId shardId) Description copied from class:AbstractLookupServiceConvert a request as sent toAbstractLookupService.lookupAsync(R, org.elasticsearch.tasks.CancellableTask, org.elasticsearch.action.ActionListener<java.util.List<org.elasticsearch.compute.data.Page>>)into a transport request after preflight checks have been performed.- Specified by:
transportRequestin classAbstractLookupService<EnrichLookupService.Request,EnrichLookupService.TransportRequest>
-
queryList
protected LookupEnrichQueryGenerator queryList(EnrichLookupService.TransportRequest request, SearchExecutionContext context, AliasFilter aliasFilter, Block inputBlock, Warnings warnings) Description copied from class:AbstractLookupServiceBuild a list of queries to perform inside the actual lookup.- Specified by:
queryListin classAbstractLookupService<EnrichLookupService.Request,EnrichLookupService.TransportRequest>
-
createLookupResponse
protected org.elasticsearch.xpack.esql.enrich.EnrichLookupService.LookupResponse createLookupResponse(List<Page> pages, BlockFactory blockFactory) throws IOException Description copied from class:AbstractLookupServiceBuild the response.- Specified by:
createLookupResponsein classAbstractLookupService<EnrichLookupService.Request,EnrichLookupService.TransportRequest> - Throws:
IOException
-
readLookupResponse
protected org.elasticsearch.xpack.esql.enrich.EnrichLookupService.LookupResponse readLookupResponse(StreamInput in, BlockFactory blockFactory) throws IOException Description copied from class:AbstractLookupServiceRead the response from aStreamInput.- Specified by:
readLookupResponsein classAbstractLookupService<EnrichLookupService.Request,EnrichLookupService.TransportRequest> - Throws:
IOException
-
sendChildRequest
protected void sendChildRequest(CancellableTask parentTask, ActionListener<List<Page>> delegate, DiscoveryNode targetNode, EnrichLookupService.TransportRequest transportRequest) -
hasEnrichPrivilege
-