[Zope-dev] Request for a Pluggin Index (NameIndex)

Chris Withers chrisw@nipltd.com
Mon, 4 Jun 2001 21:05:46 +0100


Hi,

If anyone's got the time or fancies a challenge, could they write an index
that behaves as follows:

Indexed values:
1) C.J.Withers
2) Chris Withers
3) C Petrilli
4) Christopher McDonough

search             result
C                  1,2,3,4
C.J.Withers        1
c.j.Withers        1
withers mcdonough  1,2,4
Chris              2,4
Christo            4

I think the basic rules are:
- split on whitespace and punctuation (not accentuated characters and the
like ;-)
- index each remaining name part
- when searching, return all records where any of the name parts match
something like:
string.find(name_part,search_expression)

...oh yeah, and do it blindingly quickly ;-)

This would be really useful for the Creator dublin core field and anywhere
you're searching for someone's name. The CMF could benefit from it and would
eliminate the phrase next to the Creator field which has haunted me from
Squishdot:

" Note that you must enter their username exactly. "

cheers,

Chris