Skip to content

Commit

Permalink
Fix failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-niestadt committed Nov 8, 2024
1 parent 2d0752e commit 147e0f0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@
}
],
"type": "sequence"
}
},
"matchInfos": {
"X": {
"type": "span"
}
},
"otherFields": [
"contents"
]
},
"requestedWindowSize": 30,
"searchParam": {
Expand All @@ -175,4 +183,4 @@
"windowHasNext": false,
"windowHasPrevious": false
}
}
}
12 changes: 10 additions & 2 deletions test/data/saved-responses/hits-grouped/group by capture.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@
}
],
"type": "sequence"
}
},
"matchInfos": {
"X": {
"type": "span"
}
},
"otherFields": [
"contents"
]
},
"requestedWindowSize": 30,
"searchParam": {
Expand All @@ -175,4 +183,4 @@
"windowHasNext": false,
"windowHasPrevious": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public class ResultHitsGrouped {
Set<String> otherFields = new HashSet<>();
for (MatchInfo.Def def : matchInfoDefs) {
otherFields.add(def.getField());
if (def.getTargetField() != null)
if (def.getTargetField() != null && !def.getTargetField().equals(hits.queryInfo().field().name()))
otherFields.add(def.getTargetField());
}

Expand Down

0 comments on commit 147e0f0

Please sign in to comment.