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

Aaron McGlinchy McGlinchyA at landcareresearch.co.nz
Wed Aug 20 23:21:41 UTC 2014


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



More information about the ckan-dev mailing list