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 The Flight Captain <ja...@flightcentre.com> on 2009/01/08 03:15:45 UTC

Re: Using Solr with an existing Lucene index

My first attempt to do this resulted in my Java program throwing a
CorruptIndex exception. It appears as though Solr has somehow modified my
index files in some way which causes the Lucene code to see them as corrupt
(even though I did not, at least intentionally, try to post any documents or
otherwise update the index through Lucene).

Did you manage to retrieve any data from your existing datasource through
Solr using the existing index?

If so, how? Is is just a matter of changing your data directory to your
existing index data in the solrconfig.xml, for example:
  <dataDir>/my/existing/lucene/index/data</dataDir> ?
-- 
View this message in context: http://www.nabble.com/Using-Solr-with-an-existing-Lucene-index-tp20002395p21344616.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Using Solr with an existing Lucene index

Posted by Chris Hostetter <ho...@fucit.org>.
: My first attempt to do this resulted in my Java program throwing a
: CorruptIndex exception. It appears as though Solr has somehow modified my
: index files in some way which causes the Lucene code to see them as corrupt
: (even though I did not, at least intentionally, try to post any documents or
: otherwise update the index through Lucene).

knowing the specifics of the exception would be helpful ... for example, 
if the exception message was "unknown format version: -X" that typically 
just means it was last touched by a newer version of Lucene then the 
one you are trying to read it with ... if hte version of lucene in solr is 
newer then then one you are using i can easily imagine this happening just 
from solr opening and closing an IndexWriter even if you never use Solr to 
add/commit any docs.

: If so, how? Is is just a matter of changing your data directory to your
: existing index data in the solrconfig.xml, for example:
:   <dataDir>/my/existing/lucene/index/data</dataDir> ?

solr expects the index to be named "index" inside the data directory -- 
but beyond that you also need to make sure your schema.xml is compatible 
(as mentioned in another thread i just replied to)



-Hoss