Skip to content

Commit 1be474e

Browse files
committed
Fixed tests
1 parent a0666bf commit 1be474e

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/Foundatio.Parsers.LuceneQueries/Visitors/AssignOperationTypeVisitor.cs

-13
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ public override Task VisitAsync(GroupNode node, IQueryVisitorContext context)
1717

1818
if (node.Left is not TermNode leftTerm)
1919
{
20-
// For sub aggregations we need to see if there is a parent with parens
21-
var closestParentWithParens = node.GetGroupNode();
22-
if (closestParentWithParens is { HasParens: true })
23-
return base.VisitAsync(node, context);
24-
2520
context.AddValidationError($"Aggregations ({node.Field}) must specify a field.");
2621
return Task.CompletedTask;
2722
}
@@ -46,14 +41,6 @@ public override void Visit(TermNode node, IQueryVisitorContext context)
4641
if (node.HasOperationType())
4742
return;
4843

49-
if (String.IsNullOrEmpty(node.Field))
50-
return;
51-
52-
// For sub aggregations we need to see if there is a parent with parens
53-
var closestParentWithParens = node.GetGroupNode();
54-
if (closestParentWithParens is { HasParens: true })
55-
return;
56-
5744
if (String.IsNullOrEmpty(node.Field) && !String.IsNullOrEmpty(node.Term))
5845
{
5946
context.AddValidationError($"Aggregations ({node.Term}) must specify a field.");

0 commit comments

Comments
 (0)