Query Parser in Elastic Search, JAVA API

Hello, I am new to elasticsearch and have been trying to use query parser.
Can anyone guide me in how to do that? any help would be appreciated.

What did you do ?
What is the failure ?

See : Elasticsearch Platform — Find real-time answers at scale | Elastic

David

Le 14 juin 2012 à 06:53, Harsh harsh.chhatwani@gmail.com a écrit :

Hello, I am new to elasticsearch and have been trying to use query parser. Can anyone guide me in how to do that? any help would be appreciated.

I didn't do anything, I don't know how to do it,
See, like in lucene first we create a QueryParser object and then with this
object using the parse() method we create a query. Is there anything like
this in elasticsearch?

I'm afraid not to understand.

Are you looking for something else that the example in ES site frontpage ?
$ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{
"user": "kimchy",
"post_date": "2009-11-15T14:12:12",
"message": "You know, for Search"
}'

$ curl -XGET http://localhost:9200/twitter/tweet/_search?q=user:kimchy

$ curl -XGET http://localhost:9200/twitter/tweet/_search -d '{
"query" : {
"term" : { "user": "kimchy" }
}
}'

$ curl -XGET http://localhost:9200/twitter/_search?pretty=true -d '{
"query" : {
"range" : {
"post_date" : {
"from" : "2009-11-15T13:00:00",
"to" : "2009-11-15T14:30:00"
}
}
}
}'

is it what you are after ?

Sorry if I misunderstood.

Le 14 juin 2012 à 07:35, Harsh harsh.chhatwani@gmail.com a écrit :

I didn't do anything, I don't know how to do it,
See, like in lucene first we create a QueryParser object and then with this object using the parse() method we create a query. Is there anything like this in elasticsearch?