Skip to content

Commit ddc9162

Browse files
committed
Added javadoc for ccsAnalysisOfIndexResolution
1 parent 0027aef commit ddc9162

File tree

1 file changed

+7
-12
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session

1 file changed

+7
-12
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -463,29 +463,24 @@ private void preAnalyzeIndices(
463463
}
464464

465465
/**
466-
*
467-
* @param indexResolution
468-
* @param executionInfo
469-
* @return
466+
* Updates EsqlExecutionInfo with information about unvailable clusters and clusters
467+
* with no matching indices based on the IndexResolution created from the field-caps response.
468+
* @param indexResolution IndexResolution after a field-caps call
469+
* @param executionInfo {@link EsqlExecutionInfo} for this ES|QL search
470+
* @return count of number of clusters to be searched. If count == 0, then this was a cross-cluster
471+
* search where there are no viable clusters to be searched, either due to being unavailable or
472+
* having no matching indices or some combination of those two.
470473
*/
471474
private int ccsAnalysisOfIndexResolution(IndexResolution indexResolution, EsqlExecutionInfo executionInfo) {
472475
EsqlCCSUtils.updateExecutionInfoWithClustersWithNoMatchingIndices(executionInfo, indexResolution);
473476
EsqlCCSUtils.updateExecutionInfoWithUnavailableClusters(executionInfo, indexResolution.unavailableClusters());
474-
475477
if (executionInfo.isCrossClusterSearch()) {
476478
return (int) executionInfo.getClusterStates(EsqlExecutionInfo.Cluster.Status.RUNNING).count();
477479
} else {
478480
return 1; // local cluster
479481
}
480482
}
481483

482-
/**
483-
*
484-
* @param targetClusters
485-
* @param unresolvedPolicies
486-
* @param result
487-
* @param preAnalysisResultListener
488-
*/
489484
private void attemptSecondEnrichPolicyResolutionIfNeeded(
490485
Set<String> targetClusters,
491486
Set<EnrichPolicyResolver.UnresolvedPolicy> unresolvedPolicies,

0 commit comments

Comments
 (0)