mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
inner_hits: Also never serialize _index
key for parent/child inner hits as the _index is always the same of the parent search hit
This commit is contained in:
parent
0488372c20
commit
b32d9a71e4
@ -68,7 +68,6 @@ public final class InnerHitsFetchSubPhase implements FetchSubPhase {
|
||||
for (int i = 0; i < internalHits.length; i++) {
|
||||
ScoreDoc scoreDoc = topDocs.scoreDocs[i];
|
||||
InternalSearchHit searchHitFields = internalHits[i];
|
||||
searchHitFields.shard(innerHits.shardTarget());
|
||||
searchHitFields.score(scoreDoc.score);
|
||||
if (scoreDoc instanceof FieldDoc) {
|
||||
FieldDoc fieldDoc = (FieldDoc) scoreDoc;
|
||||
|
@ -78,7 +78,7 @@ setup:
|
||||
- match: { hits.hits.0._index: "test" }
|
||||
- match: { hits.hits.0._type: "type_2" }
|
||||
- match: { hits.hits.0._id: "1" }
|
||||
- match: { hits.hits.0.inner_hits.type_3.hits.hits.0._index: "test" }
|
||||
- is_false: hits.hits.0.inner_hits.type_3.hits.hits.0._index
|
||||
- match: { hits.hits.0.inner_hits.type_3.hits.hits.0._type: "type_3" }
|
||||
- match: { hits.hits.0.inner_hits.type_3.hits.hits.0._id: "1" }
|
||||
- is_false: hits.hits.0.inner_hits.type_3.hits.hits.0._nested
|
||||
|
Loading…
x
Reference in New Issue
Block a user