[sword-devel] indexed search discrepancy (minor search.cpp patch)

Matthew Talbert ransom1982 at gmail.com
Sun Aug 30 13:35:56 MST 2009


On Sun, Aug 30, 2009 at 12:11 AM, Jonathan Marsden<jmarsden at fastmail.fm> wrote:
> Matthew Talbert wrote:
>
>> If this gets fixed, I think searching and results should be added to
>> the test suite. It would be simple to add; just run mkfastmod, then
>> the search program (it would be nice to be able to change the search
>> type without re-compiling so that different search types could be
>> done).
>
> Seems reasonable.  I just created a trivially enhanced search.cpp which
> checks for the existence of SEARCH_TYPE as an enviroment variable and
> uses it if present.  svn diff attached.  So now you can do
>
>  SEARCH_TYPE=-4 ./search KJV "swift hear slow speak"
>
> and so on and so forth.  Patch is below.

Wouldn't it be more consistent with the other utilities to have it as
an argument rather than using the environment variable? I've nothing
against it myself, but perhaps it would be better to have consistency.
Also, something I thought of later, is that it would probably be
trivial to add indexed search capability to diatheke. I don't know
which would be more valuable for use in a test script.

Matthew



More information about the sword-devel mailing list