Skip to content

Commit 5893b8a

Browse files
committed
Fix'
1 parent 4f2a83a commit 5893b8a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

server/src/main/java/org/elasticsearch/action/index/IndexRequest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,9 @@ public Index getConcreteWriteIndex(IndexAbstraction ia, ProjectMetadata project)
965965
public int route(IndexRouting indexRouting) {
966966
if (useStructuredSource) {
967967
assert structuredSource != null;
968-
return indexRouting.indexShard(id, routing, contentType, structuredSource);
968+
// TODO: Need to implement filtering
969+
// return indexRouting.indexShard(id, routing, contentType, structuredSource);
970+
return indexRouting.indexShard(id, routing, contentType, source());
969971
} else {
970972
return indexRouting.indexShard(id, routing, contentType, source());
971973
}

server/src/main/java/org/elasticsearch/cluster/routing/IndexRouting.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import java.util.function.Predicate;
5555

5656
import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken;
57+
import static org.elasticsearch.common.xcontent.XContentParserUtils.expectValueToken;
5758

5859
/**
5960
* Generates the shard id for {@code (id, routing)} pairs.
@@ -448,9 +449,7 @@ private void extractObject(@Nullable String path, XContentParser source) throws
448449

449450
private void extractArray(@Nullable String path, XContentParser source) throws IOException {
450451
while (source.currentToken() != Token.END_ARRAY) {
451-
// TODO: Fails on nested objects. I think this might work with the current implementation due to filtering which is not
452-
// implemented for ESON
453-
// expectValueToken(source.currentToken(), source);
452+
expectValueToken(source.currentToken(), source);
454453
extractItem(path, source);
455454
}
456455
}

0 commit comments

Comments
 (0)