[sword-devel] Fast search?
Troy A. Griffitts
sword-devel@crosswire.org
Wed, 27 Sep 2000 15:35:24 -0700
> The algorithms are actually not very difficult at all. :) I will
> (Lord willing) try to write the algorithms in a generic C-like
> format. Then you should be able to easily and quickly port it to
> the language of your choice. I used to work with C, and have not
> used C++ much, so I will not be able to efficiently implement these
> algorithms in Sword. I will leave that to Troy and yourself to do
> this (if you don't mind). Unless someone else volunteers?
There are many C++ coders that I'm sure would volunteer given working C
functions! I will do it if no one else does.
> The benchmarks for some of the searches I have done indicate that the
> response time is sub-second, even for complex searches with wildcards!
> (On a 600 MHz P3... :)
:) That's really not a fair test, though I'm sure your algorythms are
much faster than the current 'scan the text on the fly' method. My PIII
650 at work gives me about a 2 second search with the current method. :)
> I am currently investigating the best way to compress the index file.
> The decompression could still influence the response time, but it will
> not be much.
>
> The other outstanding issue is to efficiently implement "exact phrase"
> searches (which is in progress).
>
> *** I still need some answers to the questions I asked a while ago (17/9)
> --> How small do we really want the fast search index file?
I think fighting for a few K is not worth the effort.
> --> Will it replace the current search, or just be an additional option?
In the current architecture, there is a way to report what types of
searches your framework supports. If it does not support the requested
method, it should default to the search to the brute-force method.
> --> What is expected from the fast search?
I'm just hoping for some candidates right now. The current example fast
framework only reports that it handles multiworld, non-case-sensitive
searches bounded, at most, by a VerseKey.
It would be really cool to see your method working with only a few
scenerios.
Thank you for your efforts! I'm excited to see your work in action!
-Troy.