[jsword-devel] Key Word search in a subset of books instead of whole bible

DM Smith dmsmith555 at yahoo.com
Fri Apr 4 05:01:56 MST 2008


On Apr 4, 2008, at 7:50 AM, Yiguang Hu wrote:

> DM,
>
> Thanks for your help I got the indexing working in my
> env.
>
> I got another questions on search.
> The following two lines return me the Key (passage)
> in KJV which contains word "arron".
>
> Book bible = books.getBook("KJV");
> Key key=bible.find("arron");
>
> I am trying to narrow down the search in only a subset
> of KJV bible, such as "gen 1:1-gen 20:20,mat 1:1-rev
> 20:20", how do I do this?

Prefix the search with
+[Gen 1:1 - Gen 20:20]

This construct only works as a prefix to the rest of the search.

The + is needed to indicate that the range has to be included. You can  
use - to do exclusion and you can do required inclusion (i.e. OR) by  
having no +/-.

The easiest way to learn these syntaxes is to use BibleDesktop's  
Advanced Search feature, which is nothing more than a friendly  
interface to building the query. There is also a button on the left of  
the search input box with quick help. BibleDesktop's manual has a few  
others, such as searching notes, Strong's numbers, cross-references.

Later today, I'll probably will create a standalone program to do  
lookups. (After I finish yesterday's BookInstaller).

In Him,
	DM




More information about the jsword-devel mailing list