Closed RubbyRedson closed 7 years ago
Instead of using: evalExpr(Doc())
you can also use the nicer syntax: evalExpr Doc()
which corresponds better to the paper. If you look at the paper you can also see how this query language should look. Example from fig8:
So, as you can see the doc is selected (in this case by creating it) and then we can operate on the EXPR.
Note how doc in an EXPR
Tests in ExpressionEvaluationTest failed with message "you need to select the doc first". That happened because Evaluator had null in the node field. This can be fixed by adding evalExpr(Doc()) before executing any other evalExpr. Example: Before: eval.evalExpr(expr1).evalExpr(expr2).evalExpr(expr3) produces the exeption After: eval.evalExpr(Doc()).evalExpr(expr1).evalExpr(expr2).evalExpr(expr3) works without issues