[ckan-dev] change search from OR to AND (hotz)

James Gagan james at everlook.ca
Thu Aug 21 00:42:45 UTC 2014


Looks like "+" and "-" operators work too. But, we had a requirement
to make it always an AND without having to type in operators. Hence
the extra coding.

cheers,
James


On Wed, Aug 20, 2014 at 4:21 PM, Aaron McGlinchy
<McGlinchyA at landcareresearch.co.nz> wrote:
> Our install of CKAN (v2.2) seems to search AND by default, but I can actually specify operator such as OR or AND in my search text and it refines the result accordingly.
>
> e.g. I have 8 datasets that have the tag Flora, and of them 6 also have the tag Moss.
>
> A search for    moss flora   returns 6 results (= moss and flora)
>                 moss or flora    returns 8 results
>                 "moss or flora" = zero results (no datasets have the exact tag/text "moss or flora"
>
> So you can use the normal sorts of formatting/operators in the search box (just as in google) to fine tune the search, no special coding required (at least on v2.2)
>
> Cheers
> Aaron
>
> ________________________________
>
> Please consider the environment before printing this email
> Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
> The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev



-- 
James Gagan
Everlook Systems inc.
james at everlook.ca
250-508-2155



More information about the ckan-dev mailing list