[GeoMoose-users] exact search

Dan Little theduckylittle at gmail.com
Wed Nov 30 12:46:20 PST 2022


Hi Flavio!

I'm looking into this. We do not have a `eq-str` operator, there is likely
an error in the Javacript console and the operation isn't finishing. That's
why you're seeing the "spinner" that never stops.

Testing against the demo, I am able to query using `eq` as the operator
without any exceptions.

`eq` should be the correct operator. Can you use the `eq` operator and post
the contents of the request body? If that looks normal then we may need to
look at what's in the Mapfile.

On Wed, Nov 30, 2022 at 3:26 AM flavio rigolon <flavio.rigolon at gmail.com>
wrote:

> Hi all,
>  I' ve tried to edit the app.js file and setting the comparitor value
> to 'eq-str' (my data fields in PostGIS are varchar type):
>
> --------------------------------------------------------------------------
>     app.registerService('search-particella', SearchService, {
>
>         fields: [
>             {type: 'text', label: 'Foglio', name: 'foglio_id'},
>             {type: 'text', label: 'Mappale', name: 'mappale'}
>         ],
> prepareFields: function (fields) {
>     // reformat the fields for the query engine,
>     //  "*stuff*" will do a case-ignored "contains" query.
>     var query = ['and'];
>     for(var i = 0, ii = fields.length; i < ii; i++) {
>         if(fields[i].value !== '' && fields[i].value !== undefined) {
>             query.push({
>                 comparitor: 'eq-str',
>                 name: fields[i].name,
>                 value: fields[i].value
>             });
>         }
>     }
>     return [query];
> },
> searchLayers: ['particella-wfs/particella_patrimonio']
>     });
> --------------------------------------------------------------------------
>
> but it doesn't work: in Geomoose the rounded arrows keep turning
> without any resuts.
> If I set compartor: 'eq' the system rightly says that my fields are not
> integer.
> If I set compartor: 'ilike' all is working fine but I rightly obtain
> all the features containing the terms I inserted in the search fields.
>
> Am I using the right operator or am I missing something important?
> Thanks in advance for any help
>
> flavio
>
> Il giorno lun 28 nov 2022 alle ore 14:20 flavio rigolon
> <flavio.rigolon at gmail.com> ha scritto:
> >
> > Hi all,
> >  I'm using Geomoose 3.6.2. I'd like to perform an "exact" search on a
> > certain layer. For example: I have a parcel layer (italian cadastre)
> > in which every feature is identified by two fields: "foglio" and
> > "mappale". At this moment if I perform (i.e.) a search for "foglio"
> > number 3 and "mappale" number 5, I obtain:
> >
> > - foglio 3 - mappale 5
> > - foglio 3 - mappale 15
> > - foglio 13 - mappale 5
> > - foglio 23 - mappale 15
> > - ......
> > - foglio 23 - mappale 25
> > - ...and so on
> >
> > identifying every feature containing number 3 in "foglio" and number 5
> > in "mappale" fields (in many cases I obtain a long list which may
> > create confusion).
> > Is there a way to exactly identify the searched feature, in this case
> > "foglio 23 - mappale 5" only?
> > I hope it is clear.
> >
> > Thanks in advance for any suggestions!
> > flavio
> >
> > --
> > /"\  ASCII Ribbon Campaign
> > \ /  Respect for low technology.
> >  X  Keep e-mail messages readable by any computer system.
> > / \  Keep it ASCII.
>
>
>
> --
> /"\  ASCII Ribbon Campaign
> \ /  Respect for low technology.
>  X  Keep e-mail messages readable by any computer system.
> / \  Keep it ASCII.
> _______________________________________________
> GeoMoose-users mailing list
> GeoMoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20221130/26742d2f/attachment.htm>


More information about the GeoMoose-users mailing list