Reusing Lucene queries in Elastic Search

Hello,
I am new to elastic search, I have a small sample search application built
in lucene and for some reasons have to migrate the code to elastic search,
I wanted to know if I can use the queries as it is as its written in
Lucene. I would be glad for any help in this.

Query string should help : Elasticsearch Platform — Find real-time answers at scale | Elastic

David

Le 13 juin 2012 à 08:58, Harsh harsh.chhatwani@gmail.com a écrit :

Hello,
I am new to Elasticsearch, I have a small sample search application built in lucene and for some reasons have to migrate the code to Elasticsearch, I wanted to know if I can use the queries as it is as its written in Lucene. I would be glad for any help in this.

Could you suggest something in JAVA API?

On Wed, Jun 13, 2012 at 12:31 PM, David Pilato david@pilato.fr wrote:

Query string should help :
Elasticsearch Platform — Find real-time answers at scale | Elastic

David

Le 13 juin 2012 à 08:58, Harsh harsh.chhatwani@gmail.com a écrit :

Hello,
I am new to Elasticsearch, I have a small sample search application
built in lucene and for some reasons have to migrate the code to elastic
search, I wanted to know if I can use the queries as it is as its written
in Lucene. I would be glad for any help in this.

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

Have a look here : Elasticsearch Platform — Find real-time answers at scale | Elastic
Then, try to play with import static org.elasticsearch.index.query.QueryBuilders.*;

You should find query string builder.

David

Le 13 juin 2012 à 09:05, Harsh Chhatwani harsh.chhatwani@gmail.com a écrit :

Could you suggest something in JAVA API?

On Wed, Jun 13, 2012 at 12:31 PM, David Pilato david@pilato.fr wrote:
Query string should help : Elasticsearch Platform — Find real-time answers at scale | Elastic

David

Le 13 juin 2012 à 08:58, Harsh harsh.chhatwani@gmail.com a écrit :

Hello,
I am new to Elasticsearch, I have a small sample search application built in lucene and for some reasons have to migrate the code to Elasticsearch, I wanted to know if I can use the queries as it is as its written in Lucene. I would be glad for any help in this.

--
Harsh Chhatwani
3rd year student
M.Sc(Hons.)Maths with B.E(Hons.)Computer Science
BITS Pilani
Rajasthan(333031)

Reusing existing queries in Lucene (like custom a query) requires writing a
plugin that registers a query parser that generates that Lucene query. The
query parser knows how to parse the query definition (you effectively add
it to the Query DSL).

On Wed, Jun 13, 2012 at 8:58 AM, Harsh harsh.chhatwani@gmail.com wrote:

Hello,
I am new to Elasticsearch, I have a small sample search application
built in lucene and for some reasons have to migrate the code to elastic
search, I wanted to know if I can use the queries as it is as its written
in Lucene. I would be glad for any help in this.