Skip to content

IllegalStateException thrown in SemanticQueryBuilder #116106

@bpintea

Description

@bpintea

Description

For a _field_caps request with params: {types=, ignore_unavailable=true, expand_wildcards=open, allow_no_indices=true, index=*,-.*, serverlessRequest=true, include_empty_fields=false}, resulting in a status: 500, the following suppressed exception is logged:

java.lang.IllegalStateException: No inference results set for [semantic_text] field [description_embedding]
	at [email protected]/org.elasticsearch.xpack.inference.queries.SemanticQueryBuilder.doRewriteBuildSemanticQuery(SemanticQueryBuilder.java:169)
	at [email protected]/org.elasticsearch.xpack.inference.queries.SemanticQueryBuilder.doRewrite(SemanticQueryBuilder.java:155)
	at [email protected]/org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:281)
	at [email protected]/org.elasticsearch.index.query.BoolQueryBuilder.rewriteClauses(BoolQueryBuilder.java:399)
	at [email protected]/org.elasticsearch.index.query.BoolQueryBuilder.doRewrite(BoolQueryBuilder.java:353)
	at [email protected]/org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:281)
	at [email protected]/org.elasticsearch.index.query.BoolQueryBuilder.rewriteClauses(BoolQueryBuilder.java:399)
	at [email protected]/org.elasticsearch.index.query.BoolQueryBuilder.doRewrite(BoolQueryBuilder.java:353)
	at [email protected]/org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:281)
	at [email protected]/org.elasticsearch.search.builder.SubSearchSourceBuilder.rewrite(SubSearchSourceBuilder.java:90)
	at [email protected]/org.elasticsearch.search.builder.SubSearchSourceBuilder.rewrite(SubSearchSourceBuilder.java:38)
	at [email protected]/org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:57)
	at [email protected]/org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:40)
	at [email protected]/org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:125)
	at [email protected]/org.elasticsearch.search.builder.SearchSourceBuilder.rewrite(SearchSourceBuilder.java:1178)
	at [email protected]/org.elasticsearch.search.builder.SearchSourceBuilder.rewrite(SearchSourceBuilder.java:94)
	at [email protected]/org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:57)
	at [email protected]/org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:40)
	at [email protected]/org.elasticsearch.search.internal.ShardSearchRequest$RequestRewritable.rewrite(ShardSearchRequest.java:588)
	at [email protected]/org.elasticsearch.search.internal.ShardSearchRequest$RequestRewritable.rewrite(ShardSearchRequest.java:577)
	at [email protected]/org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:57)
	at [email protected]/org.elasticsearch.search.SearchService.queryStillMatchesAfterRewrite(SearchService.java:1740)
	at [email protected]/org.elasticsearch.action.fieldcaps.FieldCapabilitiesFetcher.canMatchShard(FieldCapabilitiesFetcher.java:245)
	at [email protected]/org.elasticsearch.action.fieldcaps.FieldCapabilitiesFetcher.doFetch(FieldCapabilitiesFetcher.java:113)
	at [email protected]/org.elasticsearch.action.fieldcaps.FieldCapabilitiesFetcher.fetch(FieldCapabilitiesFetcher.java:77)
	at [email protected]/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction$NodeTransportHandler.lambda$messageReceived$0(TransportFieldCapabilitiesAction.java:591)
	at [email protected]/org.elasticsearch.action.ActionListener.completeWith(ActionListener.java:356)
	at [email protected]/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction$NodeTransportHandler.messageReceived(TransportFieldCapabilitiesAction.java:570)
	at [email protected]/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction$NodeTransportHandler.messageReceived(TransportFieldCapabilitiesAction.java:565)
	at [email protected]/org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler$1.doRun(SecurityServerTransportInterceptor.java:579)
	at [email protected]/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27)
	at [email protected]/org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler$3.onResponse(SecurityServerTransportInterceptor.java:632)
	at [email protected]/org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler$3.onResponse(SecurityServerTransportInterceptor.java:621)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:640)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.ResizeRequestInterceptor.intercept(ResizeRequestInterceptor.java:105)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:638)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.FieldAndDocumentLevelSecurityRequestInterceptor.intercept(FieldAndDocumentLevelSecurityRequestInterceptor.java:79)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.ValidateRequestInterceptor.intercept(ValidateRequestInterceptor.java:20)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:638)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.FieldAndDocumentLevelSecurityRequestInterceptor.intercept(FieldAndDocumentLevelSecurityRequestInterceptor.java:79)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.ShardSearchRequestInterceptor.intercept(ShardSearchRequestInterceptor.java:23)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:638)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.FieldAndDocumentLevelSecurityRequestInterceptor.intercept(FieldAndDocumentLevelSecurityRequestInterceptor.java:79)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.UpdateRequestInterceptor.intercept(UpdateRequestInterceptor.java:27)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:638)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.FieldAndDocumentLevelSecurityRequestInterceptor.intercept(FieldAndDocumentLevelSecurityRequestInterceptor.java:79)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.SearchRequestInterceptor.intercept(SearchRequestInterceptor.java:20)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:638)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.IndicesAliasesRequestInterceptor.intercept(IndicesAliasesRequestInterceptor.java:127)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:638)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.SearchRequestCacheDisablingInterceptor.intercept(SearchRequestCacheDisablingInterceptor.java:53)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:638)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.BulkShardRequestInterceptor.intercept(BulkShardRequestInterceptor.java:85)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:638)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$1.onResponse(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.interceptor.DlsFlsLicenseRequestInterceptor.intercept(DlsFlsLicenseRequestInterceptor.java:106)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService.runRequestInterceptors(AuthorizationService.java:634)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService.handleIndexActionAuthorizationResult(AuthorizationService.java:619)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService.lambda$authorizeAction$13(AuthorizationService.java:517)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$AuthorizationResultListener.onResponse(AuthorizationService.java:1033)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService$AuthorizationResultListener.onResponse(AuthorizationService.java:999)
	at [email protected]/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:33)
	at [email protected]/org.elasticsearch.xpack.security.authz.RBACEngine.authorizeIndexAction(RBACEngine.java:384)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService.authorizeAction(AuthorizationService.java:510)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService.maybeAuthorizeRunAs(AuthorizationService.java:442)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService.lambda$authorize$3(AuthorizationService.java:329)
	at [email protected]/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:257)
	at [email protected]/org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:33)
	at [email protected]/org.elasticsearch.xpack.security.authz.RBACEngine.lambda$resolveAuthorizationInfo$0(RBACEngine.java:156)
	at [email protected]/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:247)
	at [email protected]/org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.lambda$getRoles$4(CompositeRolesStore.java:202)
	at [email protected]/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:247)
	at [email protected]/org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.lambda$getRole$5(CompositeRolesStore.java:220)
	at [email protected]/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:247)
	at [email protected]/org.elasticsearch.xpack.core.security.authz.store.RoleReferenceIntersection.lambda$buildRole$0(RoleReferenceIntersection.java:49)
	at [email protected]/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:247)
	at [email protected]/org.elasticsearch.action.support.GroupedActionListener.onResponse(GroupedActionListener.java:57)
	at [email protected]/org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.buildRoleFromRoleReference(CompositeRolesStore.java:317)
	at [email protected]/org.elasticsearch.xpack.core.security.authz.store.RoleReferenceIntersection.lambda$buildRole$1(RoleReferenceIntersection.java:53)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at [email protected]/org.elasticsearch.xpack.core.security.authz.store.RoleReferenceIntersection.buildRole(RoleReferenceIntersection.java:53)
	at [email protected]/org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.getRole(CompositeRolesStore.java:218)
	at [email protected]/org.elasticsearch.xpack.security.authz.store.CompositeRolesStore.getRoles(CompositeRolesStore.java:195)
	at [email protected]/org.elasticsearch.xpack.security.authz.RBACEngine.resolveAuthorizationInfo(RBACEngine.java:152)
	at [email protected]/org.elasticsearch.xpack.security.authz.AuthorizationService.authorize(AuthorizationService.java:345)
	at [email protected]/org.elasticsearch.xpack.security.transport.ServerTransportFilter.lambda$inbound$1(ServerTransportFilter.java:114)
	at [email protected]/org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:247)
	at [email protected]/org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:97)
	at [email protected]/org.elasticsearch.xpack.security.authc.AuthenticatorChain.authenticate(AuthenticatorChain.java:93)
	at [email protected]/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:264)
	at [email protected]/org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:201)
	at [email protected]/org.elasticsearch.xpack.security.transport.ServerTransportFilter.authenticate(ServerTransportFilter.java:127)
	at [email protected]/org.elasticsearch.xpack.security.transport.ServerTransportFilter.inbound(ServerTransportFilter.java:105)
	at [email protected]/org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler.messageReceived(SecurityServerTransportInterceptor.java:643)
	at [email protected]/org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:76)
	at [email protected]/org.elasticsearch.transport.TransportService$6.doRun(TransportService.java:1098)
	at [email protected]/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:1023)
	at [email protected]/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27)
	at [email protected]/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:34)
	at [email protected]/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:1023)
	at [email protected]/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1570)\n

Metadata

Metadata

Labels

:SearchOrg/RelevanceLabel for the Search (solution/org) Relevance team>bugTeam:Search - RelevanceThe Search organization Search Relevance teampriority:normalA label for assessing bug priority to be used by ES engineers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions