<div dir="ltr"><div>Martin,<br><br>These java methods are only half baked, so refrain from using them for few more days.<br><br>Take a look at LuceneIndexManager's <br>boolean needsReindexing(Book book); as the API method to detect if per-book index need to be recreated.<br>
<br>needsReindexing returns true, if Latest.Index.Version.xxx > Installed.Index.Version.xxx OR if {book's index folder} is not found at all.<br><br>Uses two property files: <br>1. IndexMetadata.properties (will be packaged with JSword) : specifies the Latest.Index.Version.xx (default version & per book index version if needed)<br>
2. {IndexFolder}/JSword/lucene/InstalledIndex.properties file for "Installed.Index.Version.book.moduleversion" values that stays persistent on clients WritableProjectDir : There will be a default version, and a per indexed book version. JSword will create this file if it does not exist, and update the version after each book is indexed through IndexManager api.<br>
<br><br></div>/sijo <br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 22, 2014 at 6:07 PM, Martin Denham <span dir="ltr"><<a href="mailto:mjdenham@gmail.com" target="_blank">mjdenham@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Could I ask for clarification regarding some of the IndexVersion metadata.<div><br></div><div>Could you clarify how </div>
<div> IndexMetadata.getInstalledIndexVersion()</div><div>and </div><div><div> IndexMetadata.getLatestIndexVersion()</div>
<div>will work. I can see how the versions with Book parameters work but it is the version without Book parameters that confuse me.</div><div><br></div><div>The descriptions are:</div><div><div> //default Installed IndexVersion: index version that is installed/available in the Client's index folders</div>
<div> //todo get Installed ver from the IndexFolder location</div><div> public float getInstalledIndexVersion() {</div></div><div><div><br></div></div></div><div><div> //Default Latest IndexVersion : Default version number of Latest indexing schema: PerBook index version must be equal or greater than this</div>
<div> public float getLatestIndexVersion</div></div><div><br></div><div>But I am still uncertain of their exact intended usage.</div><div><br></div><div>Thanks</div><span class="HOEnZb"><font color="#888888"><div>Martin</div>
</font></span></div>
<br>_______________________________________________<br>
jsword-devel mailing list<br>
<a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Sijo
</div>