[Geomoose-users] GeoMoose 3 - Search
Christopher Hughes
chughes at co.lincoln.or.us
Thu Feb 6 15:04:18 PST 2020
Hi Dan,
Do you mean changing this in the search.js file or trying to overwrite this
in app.js when creating the individual search service?
Thanks,
Chris
On Wed, Feb 5, 2020 at 6:42 AM Dan Little <theduckylittle at gmail.com> wrote:
> Hi Chirs,
>
> You can make that happen by overriding "prepareFields" in the options.
>
> This is a little rough and untested but I believe this would do it:
>
> prepareFields: function(fields) {
> var query = ['or']; // adding or to the beginning should make it
> conditional.
> var queryFields = ['PIN', 'NAME', 'STREETNAME'];
> var searchValue = fields[0].value;
> for(var i = 0, ii = queryFields.length; i < ii; i++) {
> query.push({
> comparitor: 'ilike',
> name:queryFields[i],
> value: '%' + searchValue + '%'
> });
> }
> return query;
> };
>
> On Tue, Feb 4, 2020 at 3:33 PM Christopher Hughes <
> chughes at co.lincoln.or.us> wrote:
>
>> Does anyone know if there's a way to configure a search service in
>> geomoose 3 that searches
>> over multiple fields in a single box?
>>
>> I'd like to be able to configure a simple search that allows users to
>> enter information in a single box
>> and find results that match information in any of the fields you specify.
>> This way they don't need to
>> know as much about how your data is organized. My current workaround is
>> to just create a new
>> dataset that has all the fields I want, concatenated into a single field,
>> and set geomoose to search
>> that in the service. This gets the job done but I'd rather not modify the
>> data if I don't have to.
>>
>> Thanks,
>>
>> Chris
>>
>> --
>> Chris Hughes
>>
>> GIS Analyst
>> Lincoln County Surveyor Department
>> 880 NE 7th St. l Newport, OR 97365
>> Tel: (541) 574 1283
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/geomoose-users
>
>
--
Chris Hughes
GIS Analyst
Lincoln County Surveyor Department
880 NE 7th St. l Newport, OR 97365
Tel: (541) 574 1283
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20200206/4c172fb6/attachment.html>
More information about the Geomoose-users
mailing list