Creating a no-op QueryBuilder and FilterBuilder

Hey all,
I have a bit of an odd question, hopefully someone can give me an answer.
In usergrid, we have our own existing query language. We parse this
language into an AST, then visit each of the nodes and construct an ES
query with the java client. So far, very straight forward. However, we
have 1 wrench in the works. Some of our operations can only be implemented
as filters. As a result, visiting some of our nodes results in a
QueryBuilder operation, others in a FilterBuilder operation. To keep our
context so that we still evaluate AND, OR, and NOT correctly, I'm pushing
BoolQueryBuilder and BoolFilterBuilder on to our stacks as we traverse the
tree. Within these bool terms, I will have both query and filter
operations that represent a "no-op" operation. Is there such a build that
already exists in the client, or will I need to create my own that doesn't
append any content during the build phase?

Thanks,
Todd

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/634d71c1-c03e-476c-a293-f5114cfe35cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

match all query(QueryBuilders.matchAllQuery()) and match all filter(FilterBuilders.matchAllFilter())?

On April 7, 2015 at 08:13:29, Todd Nine (tnine@apigee.com) wrote:

Hey all,
I have a bit of an odd question, hopefully someone can give me an answer. In usergrid, we have our own existing query language. We parse this language into an AST, then visit each of the nodes and construct an ES query with the java client. So far, very straight forward. However, we have 1 wrench in the works. Some of our operations can only be implemented as filters. As a result, visiting some of our nodes results in a QueryBuilder operation, others in a FilterBuilder operation. To keep our context so that we still evaluate AND, OR, and NOT correctly, I'm pushing BoolQueryBuilder and BoolFilterBuilder on to our stacks as we traverse the tree. Within these bool terms, I will have both query and filter operations that represent a "no-op" operation. Is there such a build that already exists in the client, or will I need to create my own that doesn't append any content during the build phase?

Thanks,
Todd

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/634d71c1-c03e-476c-a293-f5114cfe35cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.55238b31.74b0dc51.124%40citra-2.local.
For more options, visit https://groups.google.com/d/optout.