You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Licinio Fernández Maurelo <li...@gmail.com> on 2009/07/30 15:19:41 UTC

How can i get lucene index format version information?

 i want to get the lucene index format version from solr web app (as
luke do), i've tried looking for the info at luke handler response,
but i havn't found this info

-- 
Lici

Re: How can i get lucene index format version information?

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
2009/8/18 Licinio Fernández Maurelo <li...@gmail.com>

> Nobody knoes how can i get exactly this info : index format : -9 (UNKNOWN)
>

I think Luke may be using an older version of Lucene which is not able to
read the index created by Solr.


>
> Despite of knowing <str name="lucene-impl-version">2.9-dev 794238 -
> 2009-07-15 18:05:08</str> helps, i assume that it doesn't implies  an
> index format change
>

The best way to confirm this is to checkout Lucene revision 794238 and look
at the CHANGES.txt file.

-- 
Regards,
Shalin Shekhar Mangar.

Re: How can i get lucene index format version information?

Posted by Licinio Fernández Maurelo <li...@gmail.com>.
Nobody knoes how can i get exactly this info : index format : -9 (UNKNOWN)

Despite of knowing <str name="lucene-impl-version">2.9-dev 794238 -
2009-07-15 18:05:08</str> helps, i assume that it doesn't implies  an
index format change

Am i wrong?

El 11 de agosto de 2009 11:53, Licinio Fernández
Maurelo<li...@gmail.com> escribió:
> Thanks all for your responses,
>
> what i expect to get is the index format version as it appears in
> luke's overview  tab (index format : -9 (UNKNOWN)
>
> 2009/7/31 Jay Hill <ja...@gmail.com>:
>> Check the system request handler: http://localhost:8983/solr/admin/system
>>
>> Should look something like this:
>> <lst name="lucene">
>> <str name="solr-spec-version">1.3.0.2009.07.28.10.39.42</str>
>> <str name="solr-impl-version">1.4-dev 797693M - jayhill - 2009-07-28
>> 10:39:42</str>
>> <str name="lucene-spec-version">2.9-dev</str>
>> <str name="lucene-impl-version">2.9-dev 794238 - 2009-07-15 18:05:08</str>
>> </lst>
>>
>> -Jay
>>
>>
>> On Thu, Jul 30, 2009 at 10:32 AM, Walter Underwood <wu...@wunderwood.org>wrote:
>>
>>> I think the properties page in the admin UI lists the Lucene version, but I
>>> don't have a live server to check that on at this instant.
>>>
>>> wunder
>>>
>>>
>>> On Jul 30, 2009, at 10:26 AM, Chris Hostetter wrote:
>>>
>>>
>>>> : > 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
>>>>
>>>
>>>
>>
>
>
>
> --
> Lici
>



-- 
Lici

Re: How can i get lucene index format version information?

Posted by Licinio Fernández Maurelo <li...@gmail.com>.
Thanks all for your responses,

what i expect to get is the index format version as it appears in
luke's overview  tab (index format : -9 (UNKNOWN)

2009/7/31 Jay Hill <ja...@gmail.com>:
> Check the system request handler: http://localhost:8983/solr/admin/system
>
> Should look something like this:
> <lst name="lucene">
> <str name="solr-spec-version">1.3.0.2009.07.28.10.39.42</str>
> <str name="solr-impl-version">1.4-dev 797693M - jayhill - 2009-07-28
> 10:39:42</str>
> <str name="lucene-spec-version">2.9-dev</str>
> <str name="lucene-impl-version">2.9-dev 794238 - 2009-07-15 18:05:08</str>
> </lst>
>
> -Jay
>
>
> On Thu, Jul 30, 2009 at 10:32 AM, Walter Underwood <wu...@wunderwood.org>wrote:
>
>> I think the properties page in the admin UI lists the Lucene version, but I
>> don't have a live server to check that on at this instant.
>>
>> wunder
>>
>>
>> On Jul 30, 2009, at 10:26 AM, Chris Hostetter wrote:
>>
>>
>>> : > 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
>>>
>>
>>
>



-- 
Lici

Re: How can i get lucene index format version information?

Posted by Jay Hill <ja...@gmail.com>.
Check the system request handler: http://localhost:8983/solr/admin/system

Should look something like this:
<lst name="lucene">
<str name="solr-spec-version">1.3.0.2009.07.28.10.39.42</str>
<str name="solr-impl-version">1.4-dev 797693M - jayhill - 2009-07-28
10:39:42</str>
<str name="lucene-spec-version">2.9-dev</str>
<str name="lucene-impl-version">2.9-dev 794238 - 2009-07-15 18:05:08</str>
</lst>

-Jay


On Thu, Jul 30, 2009 at 10:32 AM, Walter Underwood <wu...@wunderwood.org>wrote:

> I think the properties page in the admin UI lists the Lucene version, but I
> don't have a live server to check that on at this instant.
>
> wunder
>
>
> On Jul 30, 2009, at 10:26 AM, Chris Hostetter wrote:
>
>
>> : > 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
>>
>
>

Re: How can i get lucene index format version information?

Posted by Walter Underwood <wu...@wunderwood.org>.
I think the properties page in the admin UI lists the Lucene version,  
but I don't have a live server to check that on at this instant.

wunder

On Jul 30, 2009, at 10:26 AM, Chris Hostetter wrote:

>
> : > 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


Re: How can i get lucene index format version information?

Posted by Chris Hostetter <ho...@fucit.org>.
: > 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


Re: How can i get lucene index format version information?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 30, 2009, at 9:19 AM, Licinio Fernández Maurelo wrote:

> i want to get the lucene index format version from solr web app (as
> luke do), i've tried looking for the info at luke handler response,
> but i havn't found this info

the Luke request handler writes it out:

    indexInfo.add("version", reader.getVersion());

It appears in the index section near the top of the response.

	Erik