You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I set the default operator on the context on a call to GenerateQueryVisitor.Run then the operator is only being applied to the left side of the first GroupNode in the graph.
eg
IQueryNode parsedQuery = await parser.ParseAsync("term1 term2 term3);
var context = new QueryVisitorContext { DefaultOperator = GroupOperator.And };
string result = GenerateQueryVisitor.Run(parsedQuery, context);
produces "term1 AND term2 term3" but should be "term1 AND term2 AND term3"
GenerateQueryVisitor needs to apply the operator to every GroupNode but this is not happening because GenerateQueryVisitor delegates to GroupNode.ToString(GroupOperator defaultOperator) which then just invokes ToString on the Left and Right.
If I set the default operator on the context on a call to GenerateQueryVisitor.Run then the operator is only being applied to the left side of the first GroupNode in the graph.
eg
produces "term1 AND term2 term3" but should be "term1 AND term2 AND term3"
GenerateQueryVisitor needs to apply the operator to every GroupNode but this is not happening because GenerateQueryVisitor delegates to GroupNode.ToString(GroupOperator defaultOperator) which then just invokes ToString on the Left and Right.
Tests and a fix attached
GenerateQueryVisitorDefaultOperator.patch
The text was updated successfully, but these errors were encountered: