Field query - doesnt seem to be a constructor signature supporting boolean fields?

Something I ran into today: FieldQuery (and FieldQueryBuilder) has various
different constructor signatures for float, double, integer, long, string
fields .... but not for boolean. (I cant find a javadoc online to refer to
now).

Is this an omission - or am I missing a trick?

Cheers,
-Nick

It accepts an Object, which can be a boolean. I will add a method for
boolean as well. Note that for this type of queries (exact numeric / boolean
match) its better to use the term query, which does not go through parsing
the query string). And yes, term query also does not have a specific boolean
method overload, but it does have an Object, so you can safely pass a
boolean value.

-shay.banon

On Thu, Nov 4, 2010 at 5:43 PM, Nick Minutello nick.minutello@gmail.comwrote:

Something I ran into today: FieldQuery (and FieldQueryBuilder) has various
different constructor signatures for float, double, integer, long, string
fields .... but not for boolean. (I cant find a javadoc online to refer to
now).

Is this an omission - or am I missing a trick?

Cheers,
-Nick

Cool. Thanks.

On 4 November 2010 18:12, Shay Banon shay.banon@elasticsearch.com wrote:

It accepts an Object, which can be a boolean. I will add a method for
boolean as well. Note that for this type of queries (exact numeric / boolean
match) its better to use the term query, which does not go through parsing
the query string). And yes, term query also does not have a specific boolean
method overload, but it does have an Object, so you can safely pass a
boolean value.

-shay.banon

On Thu, Nov 4, 2010 at 5:43 PM, Nick Minutello nick.minutello@gmail.comwrote:

Something I ran into today: FieldQuery (and FieldQueryBuilder) has various
different constructor signatures for float, double, integer, long, string
fields .... but not for boolean. (I cant find a javadoc online to refer to
now).

Is this an omission - or am I missing a trick?

Cheers,
-Nick

Just saw that those are private constructors. Just pushed and exposed both
the Object and boolean values for those in TermQueryBuilder,
FieldQueryBuilders, and in QueryBuilders static factories.

On Sat, Nov 6, 2010 at 12:38 AM, Nick Minutello nick.minutello@gmail.comwrote:

Cool. Thanks.

On 4 November 2010 18:12, Shay Banon shay.banon@elasticsearch.com wrote:

It accepts an Object, which can be a boolean. I will add a method for
boolean as well. Note that for this type of queries (exact numeric / boolean
match) its better to use the term query, which does not go through parsing
the query string). And yes, term query also does not have a specific boolean
method overload, but it does have an Object, so you can safely pass a
boolean value.

-shay.banon

On Thu, Nov 4, 2010 at 5:43 PM, Nick Minutello nick.minutello@gmail.comwrote:

Something I ran into today: FieldQuery (and FieldQueryBuilder) has
various different constructor signatures for float, double, integer, long,
string fields .... but not for boolean. (I cant find a javadoc online to
refer to now).

Is this an omission - or am I missing a trick?

Cheers,
-Nick

Excellent. Thanks.

On 5 November 2010 23:04, Shay Banon shay.banon@elasticsearch.com wrote:

Just saw that those are private constructors. Just pushed and exposed both
the Object and boolean values for those in TermQueryBuilder,
FieldQueryBuilders, and in QueryBuilders static factories.

On Sat, Nov 6, 2010 at 12:38 AM, Nick Minutello nick.minutello@gmail.comwrote:

Cool. Thanks.

On 4 November 2010 18:12, Shay Banon shay.banon@elasticsearch.comwrote:

It accepts an Object, which can be a boolean. I will add a method for
boolean as well. Note that for this type of queries (exact numeric / boolean
match) its better to use the term query, which does not go through parsing
the query string). And yes, term query also does not have a specific boolean
method overload, but it does have an Object, so you can safely pass a
boolean value.

-shay.banon

On Thu, Nov 4, 2010 at 5:43 PM, Nick Minutello <nick.minutello@gmail.com

wrote:

Something I ran into today: FieldQuery (and FieldQueryBuilder) has
various different constructor signatures for float, double, integer, long,
string fields .... but not for boolean. (I cant find a javadoc online to
refer to now).

Is this an omission - or am I missing a trick?

Cheers,
-Nick