[sword-devel] indexed search discrepancy

Greg Hellings greg.hellings at gmail.com
Mon Aug 31 09:59:34 MST 2009

On Sun, Aug 30, 2009 at 3:57 PM, DM Smith<dmsmith at crosswire.org> wrote:
> Agreed. Just need to be careful to preserve BC in so far as possible. (BTW,
> you were first in this thread to mention versioning but there were earlier
> threads to discuss it. :)
> I suggest to plan for the future and implement for the present. A simple
> number is not sufficient for the future. A versioned list of features would
> be. An ini file w/ a list of features would work well e.g.
> [index]
> lucene=1.4.3
> StandardAnalyzer=2
> Notes=1
> Headings=1
> ...

Just my $0.02: backwards compatibility in modules is one thing (though
one I think is over-rated).  Backwards compatibility in indexes is
laughable.  It gains us nothing but the headache of trying to maintain
it.  Unlike modules, for which the case is that some people may not
have easy access to module upgrades over high-bandwidth Internet,
therefore we don't want to invalidate their installed modules, indexes
are something which are generated locally.  Adding a simple entry


to whatever ini file is more than sufficient.  Library versions
starting with 1.6.1 would then look for that entry and, if it doesn't
exist, they would know that an index was created by an earlier version
of SWORD and should be updated.  The library then refuses to use the
old index, and the user is told to update the index.  This takes a
whopping 30 seconds.  The new index has the above entry, and life
proceeds.  At some point, in library version 1.9.8, we make some
update which breaks the backwards compatibility.  At that point, we
set an internal value in the library that says "Any index created with
SWORD version before 1.9.8 is incompatible" and the user is again
warned that indexes can't be used until they're updated.

To be clear: I'm not saying we need to try to break backwards
compatibility, but we're talking about inconveniencing a user who
doesn't want to spend the extra time to index, not disabling a user
who is unable to connect to the Internet.  If the user is too lazy to
set their computer to run and update indexes, that shouldn't impede
the developers or strap them with the extra burden of striving to
maintain backwards compatibility.  Yes, there are some multi-user
systems where an individual user might not have write permissions to
the global indexes, etc, etc, but they could create a personal index
until their admin runs the updates globally (I don't know if SWORD is
used in such environments, just thinking of scenarios off the top of
my head) or they can call up their admin, and ask them to run the
updates in a pretty straightforward script.


More information about the sword-devel mailing list