Skip to content

Commit 22f15e9

Browse files
authored
Refactor CrossProjectIndexExpressionsRewriter (#135588)
Refactoring pass over `CrossProjectIndexExpressionsRewriter` to make it plug into the end-to-end expression rewriting flow (#135346). The main change is isolating the logic of rewriting a single expression into `rewriteIndexExpression`. Also, fixes two smaller quirks: - instead of rewriting an empty index expression to `"*"` we rewrite to `_all`. There is a marginal difference in behavior between the two and `_all` better matches empty index expression behavior - uses project aliases consistently across rewriting qualified and unqualified expressions
1 parent 8945551 commit 22f15e9

File tree

4 files changed

+313
-315
lines changed

4 files changed

+313
-315
lines changed

server/src/main/java/org/elasticsearch/ElasticsearchException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_UUID_NA_VALUE;
8181
import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken;
8282
import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureFieldName;
83-
import static org.elasticsearch.search.crossproject.CrossProjectIndexExpressionsRewriter.NO_MATCHING_PROJECT_EXCEPTION_VERSION;
83+
import static org.elasticsearch.search.crossproject.IndexExpressionsRewriter.NO_MATCHING_PROJECT_EXCEPTION_VERSION;
8484

8585
/**
8686
* A base class for all elasticsearch exceptions.

server/src/main/java/org/elasticsearch/search/crossproject/CrossProjectIndexExpressionsRewriter.java

Lines changed: 0 additions & 179 deletions
This file was deleted.

0 commit comments

Comments
 (0)