lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: How can i get lucene index format version information?
Date Thu, 30 Jul 2009 17:26:38 GMT

: > i want to get the lucene index format version from solr web app (as

: the Luke request handler writes it out:
: 
:    indexInfo.add("version", reader.getVersion());

that's the index version (as in "i have added docs to the index, so the 
version number has changed") the question is about the format version (as 
in: "i have upgraded Lucene from 2.1 to 2.3, so the index format has 
changed")

I'm not sure how Luke get's that ... it's not exposed via a public API on 
an IndexReader.

Hmm...  SegmentInfos.readCurrentVersion(Directory) seems like it would do 
the trick; but i'm not sure how that would interact with customized 
INdexReader implementations.  i suppose we could always make it non-fatal 
if it throws an exception (just print the exception mesg in place of hte 
number)

anybody want to submit a patch to add this to the LukeRequestHandler?


-Hoss


Mime
View raw message