[sword-devel] Another Important Issue
Jerry Hastings
sword-devel@crosswire.org
Tue, 29 Aug 2000 10:08:08 -0700
Two ideas here:
1) Include word counts in your indexes. If you are doing an AND condition
check the word counts of each word and then get a verse list for the least
used word, then search those verses for the other words.
2) When checking that verses fall in the correct range for a word with lots
of hits, use something like a binary search to establish the boundaries in
the index. Then just use the index entries between the boundary records.
Jerry
At 06:15 PM 8/28/2000 -0700, Troy A. Griffitts wrote:
>Problems come with large result sets. You see, not only do we have to
>find verse references for the word[s], we also have to verify that the
>verse references are within the search range specified (valid for the
>key used to specify the search bounds). This entails iterating through
>the search results and asking the key if each one is valid. For
>extremely large result sets, this takes just as long as searching the
>entire text, actually sometimes longer than the default searching
>mechanism.
>
>Any suggestions on how to speed up this process would be greatly
>appreciated.
>
> -Troy.