[sword-devel] Search Range Issues (was: SwordReader ........)

Troy A. Griffitts scribe at crosswire.org
Sat Nov 24 10:39:38 MST 2007


I've just committed what I believe is a fix for the search range issue 
Barry was having, and hopefully this might fix other issues like what 
Karl was reporting.

If interested, here was the cause of the problem:

In 1.5.10, VerseKey was enhanced to better support clone and 
copyFrom(VerseKey).  These methods now honor if bounds was set on a 
VerseKey, e.g. Amos 1:1-Amos 9:15.

This, in general, was a good thing.

When a module is set with a key that has bounds set, and a search is 
performed, and a hit occurs, the key from the module is pulled and added 
to a result ListKey.  Now that bounds are honored across key copies, and 
since, in this scenario, bounds is set, a bounded key is added to the 
result set, which is understood rightly to be a range, but not rightly 
for our purposes here.

The solution was to clear bounds on the hit when adding to the result 
ListKey.

This is a fix that should go out in an interim release soon.  If there 
are any other fixes that people would like to get in, please submit or 
commit them soon.

My apologies for the bug.

	-Troy.




Barry Drake wrote:
> Hi Troy .............
> 
> Troy A. Griffitts wrote:
>> I have just tried your example scenario with the search example in the 
>> sword engine and get the same results.  
> Wow!  What a relief to me that is.  I was really thinking I was doing 
> something stupid here.  Sorry it's left you with a problem - but since 
> it is clearly an issue that needs a fix, I'm glad to have been able to help!
> 
> God bless,
> 
> Barry
> 
> -- From Barry Drake (The Revd) minister of the Netherfield United Reformed church, Nottingham see http://www.jesusinnetherfield.org.uk for our church homepages).
> 
> Replies - b.drake at ntlworld.com
> 
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list