Skip to content

Commit 35d9092

Browse files
committed
Merge pull request #1695 from purenewman/patch-1
Fixed potentially incorrect combining
2 parents ac18aad + 107f947 commit 35d9092

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Nest/QueryDsl/Abstractions/Query/BoolQueryExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ internal static QueryContainer CombineAsMust(this QueryContainer leftContainer,
3131

3232
internal static QueryContainer CombineAsShould(this QueryContainer leftContainer, QueryContainer rightContainer)
3333
{
34-
if (!leftContainer.CanMergeShould() || !leftContainer.CanMergeShould())
34+
if (!leftContainer.CanMergeShould() || !rightContainer.CanMergeShould())
3535
return CreateShouldContainer(new List<QueryContainer> { leftContainer, rightContainer });
3636

3737
var lBoolQuery = leftContainer.Self().Bool;
@@ -103,4 +103,4 @@ private static QueryContainer CreateMustContainer(IList<QueryContainer> mustClau
103103
Filter = filters.ToListOrNullIfEmpty()
104104
};
105105
}
106-
}
106+
}

0 commit comments

Comments
 (0)