[KinoSearch] using kinosearch without stemming

Hans Dieter Pearcey hdp at pobox.com
Thu Jun 7 11:31:40 PDT 2007


I like using KS.  It's fast, and though I sometimes get lost in the twisty maze
of classes, the documentation is generally pretty good.

I especially like using it for things that I might have previously used a
database for -- log files and the like, where I want quick and flexible
searching.

Something I keep running into is this kind of scenario:

Assume a field called "action" that can have (among other values) "rejected".
I don't want this to be stemmed, because rather than being ordinary speech it's
effectively like an enum.  So my first instinct is to make a FieldSpec subclass
with

  sub analyzed { 0 }

However, this only seems to take effect while building the invindex.  When I
search for "action:rejected", I get no results; I am guessing this is because
the searcher is still stemming it to 'reject', because if I do this instead it
works:

  sub analyzer { return KinoSearch::Analysis::LCNormalizer->new }

This is counterintuitive enough that I feel like I must be missing something.
Is there a more excellent way?

hdp.



More information about the kinosearch mailing list