Yegoroff/PlainElastic.Net — pull request #41 by gondar (2013-08-08 10:34:25+00:00)
Title: Count builder

So that I can build structered queries for count command
As a dev
I want a QueryDSL that doesn't wrap query in a 'query' key.

Changes:
* Created separate builder CountBuilder without unmeningfull stuff and with access to QueryDsl instead of query class
* Create QueryDsl which is Query that does not wrap it's content in 'query' keyword (necessary to actually execute valid count query against ElasticSearch)
* Added Count example to a sample application to show usage and rationale

This was build on top of tom's changes, however we can separate content/merge updates if it will be necessary. So please try to treat those changes as two separate ones.

I tried to follow your design as much as possible, but I couldn't find any better way to get rid of 'query' key and preserving all Query functionality then actually extending Query class. The feature is already deployed on Opentable.com so it works nicely. Treat is as Proof of Concept for Count Command execution. If you have any suggestions how to do it other way tell me so I will change code.

Best regards,
Marcin Bazydlo
OpenTable