This appears to be a bug in the FilterToMongo
<https://github.com/geotools/geotools/blob/master/modules/unsupported/mongodb/src/main/java/org/geotools/data/mongodb/FilterToMongo.java#L625>
class, where numbers are converted to Strings.

Feel free to add a bug report to the GeoTools JIRA
<https://osgeo-org.atlassian.net/projects/GEOT/issues>, and/or create a
pull request
<https://github.com/geotools/geotools/blob/master/CONTRIBUTING.md> with a
fix.

Torben

On Mon, Feb 13, 2017 at 8:38 AM, bard83 <[email protected]> wrote:

> Hi guys,
>
> I have a problem quite similar. I have this rule on the CQL filter
> 'myproperty > 0' and when I get the preview of my layer no results are
> displayed.
> The definition of the property is
>
> /{ "localName" : "myproperty", "minOccurs" : 0, "maxOccurs" : 1, "type" :
>             { "binding" : "java.lang.Double" },
>        "userData" : { "mapping" : "myproperty" }
> }/
>
> and the corrispondent mongodb's query is:
> /{ *"myproperty": { $gt: "0" }*, geometry: { $geoIntersects: { $geometry: {
> type: "Polygon", coordinates: [ [ [ -36.92910748026556, 11.76353617582845
> ],
> [ -36.92910748026556, 71.55677632417155 ], [ 99.85879498026557,
> 71.55677632417155 ], [ 99.85879498026557, 11.76353617582845 ], [
> -36.92910748026556, 11.76353617582845 ] ] ] } } } } /
>
> Why is the zero treated as a String?
>
> Thanks in advance
> Best regards
> Sante Barbuto
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.
> nabble.com/CQL-filter-not-working-on-MongoDB-DataStore-
> tp5210706p5307747.html
> Sent from the GeoServer - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to