Lucy does not (yet) support multi-value fields natively.
I want to override the behavior of the RangeQuery class to support my pseudo
multi-value fields, which I achieve by concatenating values with the \x03 byte.
I have fields containing values like:
doc 1: "123\x{03}abc"
doc 2: "def\x{03}456"
and I want to be able to do a range query like:
lower => 'abc',
upper => 'def'
and match both docs.
It looks like there are 2 possible approaches:
* override the static methods in core/Lucy/Search/RangeQuery.c for
find_lower_bound() and find_upper_bound(), or
* the core/Lucy/Index/SortCache.c Find() and Value() functions, so that they
can split the field values on the \x03 delimiter and treat each substring as a
separate value.
It seems like that second option is the better one since that should also affect
sorting, which would be a nice side effect. Maybe. :/
I'm wondering if (a) SortCache or RangeCompiler could/should be exposed as
public classes for overriding, and/or (b) if I'm just way off on this line of
thought.
pek
--
Peter Karman . http://peknet.com/ . [email protected]