[sword-devel] search indexing
DM Smith
dmsmith555 at yahoo.com
Tue Feb 19 16:08:34 MST 2008
Dean Montgomery wrote:
> Why is the sword search engine so slow on the KJV?
> I can run "grep" or "egrep" or "perl" on a plain-text KJV file and it returns
> the results in under 1 second.
>
> Another example is my linux desktop indexes all text files and pdf files
> emails etc in my home folder with a beagle tool. When it comes time to find a
> email or a text file no sooner do I start typing the text, it already starts
> showing me the results. Another closed source example of fast searching is
> google.
>
> Does sword not create indexes for fast searching books?
Nearly every Sword application can build a fast index for searching.
Each has a different way of exposing that capability. That index, once
built, is blazingly fast. And this also exposes boolean search capabilities.
The reason that you are experiencing slow search is that you are using
an old search mechanism. It essentially has to parse the OSIS xml for
each verse to extract the text and then search the result. It does this
for every verse. If you do another search, it does it all over.
More information about the sword-devel
mailing list