[sword-devel] -3 searching and CLucene

Troy A. Griffitts scribe at crosswire.org
Mon Nov 22 17:46:01 MST 2004

	Have a look in usrinst.sh and you can see the flag to turn on clucene
support in sword.  You'll have to obviously have clucene compiled and
installed on your box to compile and link against it.

	When clucene support is enabled, have a look at utilities/mkfastmod.cpp
This tool will call the sword API commands to build an index for a
module for fast searching.  Searching will still take place without the
index, but if it is built, clucene will be used for certain common types
of searches.  There are calls to query whether the index for a modules
has yet been created, and to create, so you'll probably want to add some
user interface support into macsword to take advantage of those 2 calls.

	-3 was a special search type that I needed for a research project in
seminary :)  It actually is useful.  I built it fairly generically.  If
you understand the EntryAttributes concept in SWORD, then you can use -3
search type to provide an EntryAttributes path and data and SWORD will
search your specified EntryAttributes for that data.  e.g. you can
search all headings, footnotes, Strong's Number, etc. with a properly
constructed -3 search expression.  You might find some nice usages for
it in your user interface, but it won't be as straight forward as just
adding a new search type (like 'multiword' or 'regex') for your user--
you won't want them to know about EntryAttribute expressions and such.

I'd give you an example, but apparently I can't compile sword on my new
Fedora Core 3 box due to the following error:

g++: /usr/lib/libidn.so: No such file or directory

What the heck is libidn, and why does our build system want to link
against it? :)


On Tue, 2004-11-23 at 00:22 +0000, Will Thimbleby wrote:
> Hi, could someone tell me a bit more about these two searching methods. 
> What exactly does -3 do, and what are its capabilities? What is the 
> state of CLucene integration, will it work and how do I get it to work? 
> Do these two work together?
> thanks --Will
> _______________________________________________
> sword-devel mailing list
> sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel

More information about the sword-devel mailing list