[sword-devel] Fast search?

Paul Dean sword-devel@crosswire.org
Wed, 27 Sep 2000 22:05:42 +0100

Brandon Staggs wrote:
> > The other outstanding issue is to efficiently implement "exact phrase"
> > searches (which is in progress).
> Simple. Just do an AND search, then go through the results and examine each
> verse individually making sure the phrase is there, then dump the ones that
> aren't. This is quite a bit more effecient than doing a phrase check on
> EVERY verse.

Hi, I'm new to this list, so excuse me if I'm raising an old point or
saying something silly.

The obvious way I'd have thought of doing it would be to use Perl.  Perl
is available for every conceivable platform and is clearly /the/ way to
search text.  Yes, the user would have to install Perl as well as Sword,
but that's not so bad.  To compile sword at the moment I had to install
about 6 different rpms.

Before I discovered sword, I was using a tcl/tk script to implement Perl
on scanning the bibles I had on my disk.  It could search 6 bibles for
complex regular expressions in a very short time.

God bless,

"When a man's ways please God, the stones of the street shall be at
 peace with him." - Walter Cradock.