Partial searches just got easier in Kerika

Thanks to feedback from users at Washington State’s Department of Fish and Wildlife (hat-tip to Ryan Koval & team!) we improved our Search feature to make it easier to do wild-card searches.

Wildcard searches let you easily find anything, anywhere in Kerika, by just typing in a little bit of text — as little as a single character — and get back results that match on that text.

(Of course, typing in just a single character will return too many results to be useful… 🙂 )

In general, there are two ways to do partial searches:

  • By implementing wildcards in the query that the Kerika user interface delivers to the Solr search engine that we have implemented.
  • By using a NGram Filter or an EdgeNGram filter.

Using filters could result in a huge increase in disk space utilization, and a significant drop in performance, so we opted for the wildcard approach instead.

To implement the wildcard query, we manipulate two variables in Solr: PARTIAL_MATCH_BOOST and EXACT_MATCH_BOOST.

  •  If you search with just one keyword, we show you the exact matches first, and then partial matches: we use PARTIAL_MATCH_BOOST and don’t use EXACT_MATCH_BOOST.
  • If you search with multiple keywords, we show you the results that match across all keywords first, using EXACT_MATCH_BOOST, and don’t use PARTIAL_MATCH_BOOST.

There are more ways of fine-tuning search, of course, but for now we seem to have made enough of an improvement to keep our users happy!