File tree Expand file tree Collapse file tree 5 files changed +20
-1
lines changed Expand file tree Collapse file tree 5 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 4545import org .elasticsearch .search .aggregations .AggregationExecutionException ;
4646import org .elasticsearch .search .aggregations .MultiBucketConsumerService ;
4747import org .elasticsearch .search .aggregations .UnsupportedAggregationOnDownsampledIndex ;
48+ import org .elasticsearch .search .crossproject .NoMatchingProjectException ;
4849import org .elasticsearch .search .query .SearchTimeoutException ;
4950import org .elasticsearch .transport .TcpTransport ;
5051import org .elasticsearch .xcontent .ParseField ;
7980import static org .elasticsearch .cluster .metadata .IndexMetadata .INDEX_UUID_NA_VALUE ;
8081import static org .elasticsearch .common .xcontent .XContentParserUtils .ensureExpectedToken ;
8182import static org .elasticsearch .common .xcontent .XContentParserUtils .ensureFieldName ;
83+ import static org .elasticsearch .search .crossproject .CrossProjectIndexExpressionsRewriter .NO_MATCHING_PROJECT_EXCEPTION_VERSION ;
8284
8385/**
8486 * A base class for all elasticsearch exceptions.
@@ -2022,6 +2024,12 @@ private enum ElasticsearchExceptionHandle {
20222024 184 ,
20232025 TransportVersions .REMOTE_EXCEPTION ,
20242026 TransportVersions .REMOTE_EXCEPTION_8_19
2027+ ),
2028+ NO_MATCHING_PROJECT_EXCEPTION (
2029+ NoMatchingProjectException .class ,
2030+ NoMatchingProjectException ::new ,
2031+ 185 ,
2032+ NO_MATCHING_PROJECT_EXCEPTION_VERSION
20252033 );
20262034
20272035 final Class <? extends ElasticsearchException > exceptionClass ;
Original file line number Diff line number Diff line change 99
1010package org .elasticsearch .search .crossproject ;
1111
12+ import org .elasticsearch .TransportVersion ;
1213import org .elasticsearch .cluster .metadata .ClusterNameExpressionResolver ;
1314import org .elasticsearch .cluster .metadata .IndexNameExpressionResolver ;
1415import org .elasticsearch .core .Nullable ;
2930 * Provides methods that can rewrite qualified and unqualified index expressions to canonical CCS.
3031 */
3132public class CrossProjectIndexExpressionsRewriter {
33+ public static TransportVersion NO_MATCHING_PROJECT_EXCEPTION_VERSION = TransportVersion .fromName ("no_matching_project_exception" );
34+
3235 private static final Logger logger = LogManager .getLogger (CrossProjectIndexExpressionsRewriter .class );
3336 private static final String ORIGIN_PROJECT_KEY = "_origin" ;
3437 private static final String WILDCARD = "*" ;
Original file line number Diff line number Diff line change 1010package org .elasticsearch .search .crossproject ;
1111
1212import org .elasticsearch .ResourceNotFoundException ;
13+ import org .elasticsearch .common .io .stream .StreamInput ;
14+
15+ import java .io .IOException ;
1316
1417/**
1518 * An exception that a project is missing
@@ -20,4 +23,8 @@ public NoMatchingProjectException(String projectName) {
2023 super ("No such project: [" + projectName + "]" );
2124 }
2225
26+ public NoMatchingProjectException (StreamInput in ) throws IOException {
27+ super (in );
28+ }
29+
2330}
Original file line number Diff line number Diff line change 1+ 9178000
Original file line number Diff line number Diff line change 1- extended_search_usage_telemetry,9177000
1+ no_matching_project_exception,9178000
You can’t perform that action at this time.
0 commit comments