Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Queries of a Boolean field

Hi David,

I think you are hitting this ticket: https://geomesa.atlassian.net/browse/GEOMESA-1822

To get around it, you can try updating your client geotools jars to geotools 18+. I believe that should work with geomesa 1.3.4, and fix the problem.

If that's not possible, you can do the boolean comparison as a post-query filter, or change it to a string or int of 0 or 1.

Thanks,

Emilio

On 07/09/2018 01:29 PM, David Boyd wrote:

All:

   Having an interesting issue in our software.  We just realized that queries against type Boolean fields are not working.
We are on Geomesa 1.3.4.

Here is our feature schema:

Schema Details:

INFO  Describing attributes of feature 'session_meta'

creator      | String

saved        | Boolean

objectkey    | String  (Attribute indexed)

lastmodified | Date    (Spatio-temporally indexed)

name         | String

description  | String

source       | String

datecreated  | Date

title        | String

version      | String

status       | Integer

 

User data:

  geomesa.index.dtg            | lastmodified

  geomesa.indices              | records:2:3,attr:5:3

  geomesa.table.sharing        | true

  geomesa.table.sharing.prefix |

We have tried multiple tests using the geomesa export command as follows:

[root@node26 geomesa]# bin/geomesa export -z node02 -c CoalesceSearch -i oerepo -u <user> -p <password> -f session_meta -a objectkey,saved -q 'saved = True'

objectkey:String:cardinality=high:index=full,saved:Boolean

INFO  Feature export complete to standard out in 4038ms for 0 features

We have tried in the test True, TRUE, true, "TRUE","true","True"

If we put a not in front as follows we do see there is a valid value in the field:

[root@node26 geomesa]# bin/geomesa export -z node02 -c CoalesceSearch -i  oerepo -u <user> -p <password>   -f session_meta -a objectkey,saved -q 'not saved = true'

objectkey:String:cardinality=high:index=full,saved:Boolean

30c59c08-e8cd-4763-aa93-3db70c5b51de,true

According to the BNF for ECQL at: https://github.com/geotools/geotools/blob/master/modules/library/cql/ECQL.md

<boolean literal> ::= "TRUE" | "FALSE" 
According to the error message on a bad query the lowercase should work:

    "=" "true" ...
    "=" "false" ...
What are we missing here?

-- 
========= mailto:dboyd@xxxxxxxxxxxxxxxxx ============
David W. Boyd                     
VP,  Data Solutions       
10432 Balls Ford, Suite 240  
Manassas, VA 20109         
office:   +1-703-552-2862        
cell:     +1-703-402-7908
============== http://www.incadencecorp.com/ ============
ISO/IEC JTC1 WG9, editor ISO/IEC 20547 Big Data Reference Architecture
Chair ANSI/INCITS TC Big Data
Co-chair NIST Big Data Public Working Group Reference Architecture
First Robotic Mentor - FRC, FTC - www.iliterobotics.org
Board Member- USSTEM Foundation - www.usstem.org

The information contained in this message may be privileged 
and/or confidential and protected from disclosure.  
If the reader of this message is not the intended recipient 
or an employee or agent responsible for delivering this message 
to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication 
is strictly prohibited.  If you have received this communication 
in error, please notify the sender immediately by replying to 
this message and deleting the material from any computer.

 


_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users


Back to the top