[jsword-devel] IndexVersion metadata clarification

Sijo Cherian sijo.cherian at gmail.com
Fri Apr 25 07:24:28 MST 2014


My updates @ https://github.com/crosswire/jsword/pull/79

DM,
In Bibledesktop, *IndexManager.needsReindexing()* check can be used during
a upgrade, to prompt "Index outdated message". Current isIndexed() works
well for "Enable search", but if you combine both this usecase using
"Reenable Search", then it needs to be checked everytime user does a query.
For major index upgrade : In Jsword we change LatestIndexVersion (in
IndexMetadata.properties packaged in JS), and if FrontEnds use the
IndexManager.needsReindexing, then it can be used to prompt reindexing.

Martin,
 If AB wants to stays at current indexing schema which is 1.2(or another
light weight version), I am thinking you can maintain a custom
IndexMetadata.properties for your app , with your compatible latest version
values.
 For downloading you can get the version using
* IndexMetadata.getLatestIndexVersion()*, download using your url, then
update the InstalledVersion property on the client machine using
InstalledIndex.instance().storeInstalledIndexMetadata(properymap); If it is
generic code for all downloadIndex usages, this can be added to
download-index method of LuceneIndexManager.
 If you save the InstalledVersion on clients phone, then you can do
IndexOutdated-check using IndexManager.needsReindexing(). You can do
something similar to this method
LuceneIndexManagerTest.createOrUpgradeIndex(book).

Chris,
You may be able to maintain a custom IndexMetadata.properties for STEP's
own indices and prompt reindexing on upgrade.

All feedback is appreciated.
cheers
/sijo


On Wed, Apr 23, 2014 at 1:04 PM, Martin Denham <mjdenham at gmail.com> wrote:

> Hi Sijo,
>
> I am trying to create an appropriate downloadIndex method and so am
> looking for the right *indexVersion* number to add to an index download
> url a bit like:
>    {indexDownloadUrl}/{indexVersion}/{moduleIndex}
> e.g.
>    www.crosswire.org/and-bible/jsword/search/1.1/esv-1.0.1.zip
>
> so for And Bible it may well be e.g. 1.1 but STEP 1.2 but I don't know
> where the appropriate target index version will be stored.  It looked like
> it might be IndexMetaData.getInstalledIndexVersion().
>
> Or maybe I need to wait a bit until you have done some more work on the
> index framework.
>
> Martin
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
>
>


-- 
Regards,
Sijo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20140425/7488a3e5/attachment.html>


More information about the jsword-devel mailing list