[sword-devel] Fast search?

Rob Barrett/Almaden/IBM sword-devel@crosswire.org
Wed, 27 Sep 2000 13:50:00 -0700



>> 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.

> -Brandon

It also saves on storing word position information in the index file, which
is the other solution.  It is pretty efficient to narrow down the search
results afterward, unless the individual words commonly appear in the same
verse but not adjacent to one another (such as a search for "and God the"
or something).  Storing word position in the index file solves this
problem, but increases the index size.

Rob