Open eawagner opened 7 years ago
Since having written this, I would suggest looking into using one of the following depending on your use case.
JEXL - java style syntax, with feature rich AST for developing against. Lucene - More use friendly syntax and compatible with lots of popular systems (ElasticSearch, Solr, etc). More complicated AST to work with however. Calcite - SQL syntax support and very feature rich AST. Most complicated than the others but much more feature rich set of capabilities for defining queries.
There are a number of libraries out there that provide a lot of the same functionality of the query and criteria APIs.
That being said, we should probably pick which library support we should use.
I am impartial to JEXL because it provides a very rich AST for representing queries and a very flexible evaluation engine. That being said, it is very very complex in some instances.
Alternatives could also include:
If we chose one we need to distinguish between the definition of a query VS the evaluation of a query. We can use different libraries for each.