Hey,

you can write your own plugin, which simply registers a custom parser on
start up of elasticsearch, which is able to parse the above statement. So,
basically there is nothing stopping you from doing this. You could embed
this parser in the JSON DSL, but if you do not like it, you could simply
write your own REST HTTP action, which parses the above as text without
JSON being involved.

Take a look at some rest actions and at the QueryParser interface and its
implementions.

Elasticsearch tries to be as modular as possible in order to give you
exactly this flexibility, that you can write your own custom
implementations, in case you are unhappy with the status quo. And hopefully
open source them :-)


--Alex


On Thu, Dec 19, 2013 at 8:05 PM, xin zhang <[email protected]> wrote:

> I used ES for one year I like all features it provides except the query
> DSL. The json style DSL is not intuitive and was confused me for a while
> when I was putting multiple conditions together at very beginning.
>
> enlightened by Jira, I am thinking why don't ES create a DSL like:
>
> project = ES AND issuetype = "New Feature" AND fixVersion = 3.1 ORDER BY
> created DESC, cf[10514] DESC
>
> this kind of external DSL needs a parser which might be the reason ES
> chose json style internal DSL at beginning. But from user perspective, the
> external DSL is much better to understand and use. I know there are SDKs
> for most of popular languages which relieves people's life a lot, but an
> easier query DSL is still valuable to people who want to directly play with
> ES's rest api.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/7650a534-fab1-4ccf-addd-a59085f35f08%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_ofHn8ApoELzeqSJG2Zrfu2bTJp2nBeDXpP7AP%3DSLAMA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to