[bt-devel] save search analysis - updated

Joachim Ansorg bt-devel@crosswire.org
Wed, 16 Jan 2002 17:29:55 +0100


Hi Mark!

Sorry for the really late answer!

> for some reason, when i'm getting the scope back, it's only returning a
> list of one key.  if i set the scope to be "History", the only key in
> the list is Joshua 1:1 (the first key of the expected list).

You are right. You get only the first part of the scope back. 
The original scope of "history" is "Jos - Est". But you get only Joshua back.
I needed some thinnking about this.


You know, the scope is a list of keys. These keys might be VerseKey objects 
if they are used for a Bible or a Commentary. But each VerseKey may have a 
LowerBound() and an UpperBound(). 
For history this is:
	VerseKey::LowerBound() of the first element returns Joshua 1:1
	VerseKey::UpperBound() of the first element returns the last verse of Ester

Have a look at CSwordModuleSearch::scope(), I added there some test to parse 
the scope key. I hope this helps you to understand the structure of the scope.

Note, that a scope may have more than one element. An example for this might 
be "Gen-Exo; John-Rev; Jos-Est". This is a scope with three elements, each 
with lower and upper bound.


Joachim