I think only a few of the filters are set up to work with multiples (say in the result of a join), I imagine these could be adapted to work on a dataset that has some kind of array type natively... It is relatively uncommon to have multiples so not a lot of functions are going to be set up to work with this way, so you may need to work on the code ...
Can you try a filter that is known to work with multiples just to see if MongoDB is setup to consider this idea? There should be some kind of "match action" "any" "all" "one" that would be appropriate ... here are the geotools docs: https://docs.geotools.org/latest/userguide/library/opengis/filter.html#matchaction Looking at the diagram there it appears that LIKE is a "multi valued filter" so the option would be supported if you were doing an XML query. I am not sure if ECQL supports this idea so you may have a feature request ... -- Jody Garnett On Fri, 19 Jul 2019 at 10:42, Artem Groznykh <[email protected]> wrote: > Hello. > > I use: > > - window 7 > - mongoDB 3.6 > - GeoServer 2.15.2 > - mongoDB plugin (for GeoServer 2.15.2) > - YSLD plugin (for GeoServer 2.15.2) > > I've created a collection with data from here > <https://docs.geoserver.org/stable/en/user/data/app-schema/mongo-tutorial.html#use-case> > (just > two records), created 2dsphere index > > Then I've created a layer and an YSLD style for that layer. > > When I use simple attributes (that are not multiple) in the filter all is > fine: > > feature-styles: > - rules: > - filter: ${"name" ILIKE 'station%'} > symbolizers: > - point: > size: 16 > symbols: > - mark: > shape: circle > fill-color: '#00F' > > [image: test_multifields_YSLD.jpg] > > > When I use attributes that are multiple in the filter then it DOES NOT work > > feature-styles: > - rules: > - filter: ${ "measurements.name" = 'wind' } > symbolizers: > - point: > size: 16 > symbols: > - mark: > shape: circle > fill-color: '#00F' > > [image: test_multifields_YSLD (1).jpg] > > > Maybe it relates somehow to the bug > <https://osgeo-org.atlassian.net/browse/GEOS-9291> that I reported (when > OR operator does not work in CQL filter of a layer with multiple attributes) > > How can I make it work? > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > Без > вирусов. www.avast.ru > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > <#m_-1510410678340779583_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > _______________________________________________ > 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 >
_______________________________________________ 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
