File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ public function getQuery(): Queryable
122122 ],
123123 ]);
124124
125+ // The inverse of nested:filter/must is must_not:nested, not nested:must_not
126+ // https://github.com/elastic/elasticsearch/issues/26264#issuecomment-323668358
125127 if (!$ this ->nestedMustNot ->isEmpty ()) {
126128 $ this ->query ->mustNot ([
127129 'nested ' => [
@@ -291,14 +293,7 @@ private function addPlayedFilter()
291293 if ($ this ->params ->playedFilter === 'played ' ) {
292294 $ this ->nested ->filter (['terms ' => ['beatmaps.beatmap_id ' => $ this ->getPlayedBeatmapIds ()]]);
293295 } elseif ($ this ->params ->playedFilter === 'unplayed ' ) {
294- // The inverse of nested:filter/must is must_not:nested, not nested:must_not
295- // https://github.com/elastic/elasticsearch/issues/26264#issuecomment-323668358
296- $ this ->query ->mustNot ([
297- 'nested ' => [
298- 'path ' => 'beatmaps ' ,
299- 'query ' => ['terms ' => ['beatmaps.beatmap_id ' => $ this ->getPlayedBeatmapIds ()]],
300- ],
301- ]);
296+ $ this ->nestedMustNot ->should (['terms ' => ['beatmaps.beatmap_id ' => $ this ->getPlayedBeatmapIds ()]]);
302297 }
303298 }
304299
You can’t perform that action at this time.
0 commit comments