Time Based queries

Hi,
I am new to Elastic Search and currently looking into Java API. I have
used XCOntentQueryBuilder
XContentQueryBuilder qb = termQuery("@message", someString);

In addition to the name value pair , I also need to have time
parameter passed to the query. Any suggestions on which QueryBuilder
can be used? Any comments/suggestions welcome!

Any inputs on this? I need to construct a query with multiple name/
value pairs.

On Jul 28, 12:45 pm, ElasticUser lkodwa...@gmail.com wrote:

Hi,
I am new to Elastic Search and currently looking into Java API. I have
used XCOntentQueryBuilder
XContentQueryBuilder qb = termQuery("@message", someString);

In addition to the name value pair , I also need to have time
parameter passed to the query. Any suggestions on which QueryBuilder
can be used? Any comments/suggestions welcome!

One option is to use the bool query to combine different queries:
Elasticsearch Platform — Find real-time answers at scale | Elastic.

Another option is to use filtered query:

the query you want to execute, and a filter (which can be simple ones,
like term/range/..., or compound ones like and/or).

Why you would want to use filters compared to queries is explained here:
Elasticsearch Platform — Find real-time answers at scale | Elastic.

On Fri, Jul 29, 2011 at 1:11 AM, ElasticUser lkodwaney@gmail.com wrote:

Any inputs on this? I need to construct a query with multiple name/
value pairs.

On Jul 28, 12:45 pm, ElasticUser lkodwa...@gmail.com wrote:

Hi,
I am new to Elastic Search and currently looking into Java API. I have
used XCOntentQueryBuilder
XContentQueryBuilder qb = termQuery("@message", someString);

In addition to the name value pair , I also need to have time
parameter passed to the query. Any suggestions on which QueryBuilder
can be used? Any comments/suggestions welcome!