[elephant-devel] full text indexing

Gábor Melis mega at hotpop.com
Sun Mar 13 20:08:30 UTC 2005


On Monday 07 March 2005 09:34, Gábor Melis wrote:
> There are 100k users in the db. Each user has a description string. I need
> to search users for words in their descriptions by prefix. Currently I lean
> towards simply maintaining a reverse word->oid index in a btree. Searching
> this is easy, but whenever a description changes the old mapping entries
> for that oid need to be deleted and the new ones added. Has any of you
> implemented such a scheme or have other ideas?

It seems I've got a mostly working albeit a bit ugly implementation of simple 
text indexing. The index code was modified to allow multiple keys to be 
returned by key-fn. See attachment.

The rest of the code will follow once I figure out how to clean it up. Now, I 
have a freaking cursor join for duplicates implementation in lisp because I 
wasn't aware of db join. There is hope mine is faster, though :-).

>
> Cheers, Gábor
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multikey-index.patch
Type: text/x-diff
Size: 5638 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20050313/6a51023a/attachment.patch>


More information about the elephant-devel mailing list