Please use the user list (so you can connect with more MongoDB users). The developer list is used for folks working on the next release of GeoServer.
In this case you may wish to look at the GeoTools codebase where the MongoDB support is implemented: https://github.com/geotools/geotools/tree/master/modules/plugin/mongodb And reach out to the geotools user list. -- Jody Garnett On Thu, 20 Jun 2019 at 09:55, groznykh <[email protected]> wrote: > Hi all > > I use GeoServer 2.15 and MongoDB 3.6 > > I've created a collection with data from here > < > https://docs.geoserver.org/stable/en/user/data/app-schema/mongo-tutorial.html> > > (just two records), created 2dsphere index > > Then I created a layer from that collection and tried to request it by WMS > with cql_filter in URL params. > > > 1. when I use simple attributes (that are not multiple) in the filter all > is > fine (points are visible): > > - filter: "contract.mail" ILIKE '%@mail.com%' OR "name" ILIKE > '%station%' > > - mongo log: { ... , filter: { }, projection: { geometry: 1, > contact.mail: 1, name: 1 }, ... } > > <http://osgeo-org.1560.x6.nabble.com/file/t385081/stations-stations.png> > > 2. when I use attributes that are multiple in the filter then it DOES NOT > work (there is no any point on received PNG): > > - filter: "measurements.name" ILIKE '%wind%' OR "measurements.unit" > ILIKE > '%c%' > > - mongo log: { ... , filter: { }, projection: {geometry: 1, > measurements.unit: 1, measurements.name: 1}, ... } > > < > http://osgeo-org.1560.x6.nabble.com/file/t385081/stations-stations_%281%29.png> > > > 3. when I change OR to AND in previous filter then it's works fine: > > - filter: "measurements.name" ILIKE '%wind%' AND "measurements.unit" > ILIKE > '%c%' > > - mongo log: { ..., filter: { $and: [ { measurements.name: /^.*wind.*$/i > }, { measurements.unit: /^.*p.*$/i } ] }, projection: { geometry: 1 }, ... > } > > < > http://osgeo-org.1560.x6.nabble.com/file/t385081/stations-stations_%282%29.png> > > > So I concluded that GeoServer does AND operation by sending filter to > mongoDB. And OR operation by itself requesting all records from collection. > But with attributes that are multiple something goes wrong. I think it's a > bug. > > If you have any sugestions please tell me. > > > > -- > Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-Dev-f3819232.html > > > _______________________________________________ > Geoserver-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-devel >
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
