You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Chaula Ganatra <cg...@asite.com> on 2008/09/26 12:49:26 UTC
How to restore corrupted index
We have an application in which index will be updated frequently.
During development time, found that index files gets corrupted, i.e.
more than one cfs files,some other extension files e.g. frq, fnm, nrm
Remains there in index directory.
Is there any way that such issue does not occur at all or if it happens
we can recover the index data again?
It would be a great help, if some one can.
Regards,
Chaula
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
OK it does sound like you're primarily protecting against an
untrustworthy storage system (or, maybe, Lucene bugs ;).
Probably the best option is to do this fully externally, ie, compute
digest yourself, store it away in a separate Lucene field, then test
the digest on loading the field?
Mike
Jason Rutherglen wrote:
> I'm thinking more in terms of CRC32 checks performed on database
> pages. Is there a way to incorporate this technique in a way that
> does not affect performance too much in Lucene? The question is, when
> is the CRC32 check is performed, and to which files is it applied if
> any?
>
> On Fri, Sep 26, 2008 at 12:13 PM, Michael McCandless
> <lu...@mikemccandless.com> wrote:
>>
>> Corrupted data in what sense?
>>
>> EG if you don't trust your IO system to store data properly?
>>
>> Mike
>>
>> Jason Rutherglen wrote:
>>
>>> Mike,
>>>
>>> As part of my goal of trying to use Lucene as primary storage
>>> mechanism (perhaps not the best idea), what do you think is the best
>>> way to handle storing data in Lucene and preventing corrupted data
>>> the
>>> way something like an SQL database handles corrupted data? Or is
>>> there simply no good way to do this?
>>>
>>> Jason
>>>
>>> On Fri, Sep 26, 2008 at 10:30 AM, Michael McCandless
>>> <lu...@mikemccandless.com> wrote:
>>>>
>>>> It's perfectly fine to have a reader open on an index, while an
>>>> IndexWriter
>>>> runs optimize.
>>>>
>>>> Which version of Lucene are you using? And which OS & filesystem?
>>>>
>>>> Mike
>>>>
>>>> Chaula Ganatra wrote:
>>>>
>>>>> It was the Reader on same index, which I did not close so gave
>>>>> exception
>>>>> in writer.optimise()
>>>>>
>>>>> Chaula
>>>>>
>>>>> -----Original Message-----
>>>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>>>> Sent: 26 September, 2008 7:17 PM
>>>>> To: java-user@lucene.apache.org
>>>>> Subject: Re: How to restore corrupted index
>>>>>
>>>>>
>>>>> Can you post the full stack trace in both cases?
>>>>>
>>>>> Mike
>>>>>
>>>>> Chaula Ganatra wrote:
>>>>>
>>>>>> I found one case when such multiple files are remained, when we
>>>>>> call
>>>>>> writer.optimise() it throws exception and multiple files
>>>>>> remained in
>>>>>> index dir.
>>>>>>
>>>>>> After such multiple files, when we add document in index by
>>>>>> calling
>>>>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>>>>
>>>>>> Regards,
>>>>>> Chaula
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>>>>> Sent: 26 September, 2008 6:02 PM
>>>>>> To: java-user@lucene.apache.org
>>>>>> Subject: Re: How to restore corrupted index
>>>>>>
>>>>>> There is the CheckIndex tool included in the distribution for
>>>>>> checking/
>>>>>> fixing bad indexes, but it can't solve everything.
>>>>>>
>>>>>> The bigger question is why it is happening to begin with. Can
>>>>>> you
>>>>>> describe your indexing process? How do you know the index is
>>>>>> actually
>>>>>> corrupted? Are you seeing exceptions when opening it?
>>>>>>
>>>>>> -Grant
>>>>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>>>>
>>>>>>> We have an application in which index will be updated
>>>>>>> frequently.
>>>>>>>
>>>>>>> During development time, found that index files gets
>>>>>>> corrupted, i.e.
>>>>>>> more than one cfs files,some other extension files e.g. frq,
>>>>>>> fnm,
>>>>>>> nrm
>>>>>>>
>>>>>>> Remains there in index directory.
>>>>>>>
>>>>>>> Is there any way that such issue does not occur at all or if it
>>>>>>> happens
>>>>>>> we can recover the index data again?
>>>>>>>
>>>>>>> It would be a great help, if some one can.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Chaula
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --------------------------
>>>>>> Grant Ingersoll
>>>>>> http://www.lucidimagination.com
>>>>>>
>>>>>> Lucene Helpful Hints:
>>>>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>>>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Jason Rutherglen <ja...@gmail.com>.
I'm thinking more in terms of CRC32 checks performed on database
pages. Is there a way to incorporate this technique in a way that
does not affect performance too much in Lucene? The question is, when
is the CRC32 check is performed, and to which files is it applied if
any?
On Fri, Sep 26, 2008 at 12:13 PM, Michael McCandless
<lu...@mikemccandless.com> wrote:
>
> Corrupted data in what sense?
>
> EG if you don't trust your IO system to store data properly?
>
> Mike
>
> Jason Rutherglen wrote:
>
>> Mike,
>>
>> As part of my goal of trying to use Lucene as primary storage
>> mechanism (perhaps not the best idea), what do you think is the best
>> way to handle storing data in Lucene and preventing corrupted data the
>> way something like an SQL database handles corrupted data? Or is
>> there simply no good way to do this?
>>
>> Jason
>>
>> On Fri, Sep 26, 2008 at 10:30 AM, Michael McCandless
>> <lu...@mikemccandless.com> wrote:
>>>
>>> It's perfectly fine to have a reader open on an index, while an
>>> IndexWriter
>>> runs optimize.
>>>
>>> Which version of Lucene are you using? And which OS & filesystem?
>>>
>>> Mike
>>>
>>> Chaula Ganatra wrote:
>>>
>>>> It was the Reader on same index, which I did not close so gave exception
>>>> in writer.optimise()
>>>>
>>>> Chaula
>>>>
>>>> -----Original Message-----
>>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>>> Sent: 26 September, 2008 7:17 PM
>>>> To: java-user@lucene.apache.org
>>>> Subject: Re: How to restore corrupted index
>>>>
>>>>
>>>> Can you post the full stack trace in both cases?
>>>>
>>>> Mike
>>>>
>>>> Chaula Ganatra wrote:
>>>>
>>>>> I found one case when such multiple files are remained, when we call
>>>>> writer.optimise() it throws exception and multiple files remained in
>>>>> index dir.
>>>>>
>>>>> After such multiple files, when we add document in index by calling
>>>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>>>
>>>>> Regards,
>>>>> Chaula
>>>>>
>>>>> -----Original Message-----
>>>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>>>> Sent: 26 September, 2008 6:02 PM
>>>>> To: java-user@lucene.apache.org
>>>>> Subject: Re: How to restore corrupted index
>>>>>
>>>>> There is the CheckIndex tool included in the distribution for
>>>>> checking/
>>>>> fixing bad indexes, but it can't solve everything.
>>>>>
>>>>> The bigger question is why it is happening to begin with. Can you
>>>>> describe your indexing process? How do you know the index is actually
>>>>> corrupted? Are you seeing exceptions when opening it?
>>>>>
>>>>> -Grant
>>>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>>>
>>>>>> We have an application in which index will be updated frequently.
>>>>>>
>>>>>> During development time, found that index files gets corrupted, i.e.
>>>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>>>> nrm
>>>>>>
>>>>>> Remains there in index directory.
>>>>>>
>>>>>> Is there any way that such issue does not occur at all or if it
>>>>>> happens
>>>>>> we can recover the index data again?
>>>>>>
>>>>>> It would be a great help, if some one can.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Chaula
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --------------------------
>>>>> Grant Ingersoll
>>>>> http://www.lucidimagination.com
>>>>>
>>>>> Lucene Helpful Hints:
>>>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
Corrupted data in what sense?
EG if you don't trust your IO system to store data properly?
Mike
Jason Rutherglen wrote:
> Mike,
>
> As part of my goal of trying to use Lucene as primary storage
> mechanism (perhaps not the best idea), what do you think is the best
> way to handle storing data in Lucene and preventing corrupted data the
> way something like an SQL database handles corrupted data? Or is
> there simply no good way to do this?
>
> Jason
>
> On Fri, Sep 26, 2008 at 10:30 AM, Michael McCandless
> <lu...@mikemccandless.com> wrote:
>>
>> It's perfectly fine to have a reader open on an index, while an
>> IndexWriter
>> runs optimize.
>>
>> Which version of Lucene are you using? And which OS & filesystem?
>>
>> Mike
>>
>> Chaula Ganatra wrote:
>>
>>> It was the Reader on same index, which I did not close so gave
>>> exception
>>> in writer.optimise()
>>>
>>> Chaula
>>>
>>> -----Original Message-----
>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>> Sent: 26 September, 2008 7:17 PM
>>> To: java-user@lucene.apache.org
>>> Subject: Re: How to restore corrupted index
>>>
>>>
>>> Can you post the full stack trace in both cases?
>>>
>>> Mike
>>>
>>> Chaula Ganatra wrote:
>>>
>>>> I found one case when such multiple files are remained, when we
>>>> call
>>>> writer.optimise() it throws exception and multiple files remained
>>>> in
>>>> index dir.
>>>>
>>>> After such multiple files, when we add document in index by calling
>>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>>
>>>> Regards,
>>>> Chaula
>>>>
>>>> -----Original Message-----
>>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>>> Sent: 26 September, 2008 6:02 PM
>>>> To: java-user@lucene.apache.org
>>>> Subject: Re: How to restore corrupted index
>>>>
>>>> There is the CheckIndex tool included in the distribution for
>>>> checking/
>>>> fixing bad indexes, but it can't solve everything.
>>>>
>>>> The bigger question is why it is happening to begin with. Can you
>>>> describe your indexing process? How do you know the index is
>>>> actually
>>>> corrupted? Are you seeing exceptions when opening it?
>>>>
>>>> -Grant
>>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>>
>>>>> We have an application in which index will be updated frequently.
>>>>>
>>>>> During development time, found that index files gets corrupted,
>>>>> i.e.
>>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>>> nrm
>>>>>
>>>>> Remains there in index directory.
>>>>>
>>>>> Is there any way that such issue does not occur at all or if it
>>>>> happens
>>>>> we can recover the index data again?
>>>>>
>>>>> It would be a great help, if some one can.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Chaula
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --------------------------
>>>> Grant Ingersoll
>>>> http://www.lucidimagination.com
>>>>
>>>> Lucene Helpful Hints:
>>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Jason Rutherglen <ja...@gmail.com>.
Mike,
As part of my goal of trying to use Lucene as primary storage
mechanism (perhaps not the best idea), what do you think is the best
way to handle storing data in Lucene and preventing corrupted data the
way something like an SQL database handles corrupted data? Or is
there simply no good way to do this?
Jason
On Fri, Sep 26, 2008 at 10:30 AM, Michael McCandless
<lu...@mikemccandless.com> wrote:
>
> It's perfectly fine to have a reader open on an index, while an IndexWriter
> runs optimize.
>
> Which version of Lucene are you using? And which OS & filesystem?
>
> Mike
>
> Chaula Ganatra wrote:
>
>> It was the Reader on same index, which I did not close so gave exception
>> in writer.optimise()
>>
>> Chaula
>>
>> -----Original Message-----
>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: 26 September, 2008 7:17 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: How to restore corrupted index
>>
>>
>> Can you post the full stack trace in both cases?
>>
>> Mike
>>
>> Chaula Ganatra wrote:
>>
>>> I found one case when such multiple files are remained, when we call
>>> writer.optimise() it throws exception and multiple files remained in
>>> index dir.
>>>
>>> After such multiple files, when we add document in index by calling
>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>
>>> Regards,
>>> Chaula
>>>
>>> -----Original Message-----
>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>> Sent: 26 September, 2008 6:02 PM
>>> To: java-user@lucene.apache.org
>>> Subject: Re: How to restore corrupted index
>>>
>>> There is the CheckIndex tool included in the distribution for
>>> checking/
>>> fixing bad indexes, but it can't solve everything.
>>>
>>> The bigger question is why it is happening to begin with. Can you
>>> describe your indexing process? How do you know the index is actually
>>> corrupted? Are you seeing exceptions when opening it?
>>>
>>> -Grant
>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>
>>>> We have an application in which index will be updated frequently.
>>>>
>>>> During development time, found that index files gets corrupted, i.e.
>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>> nrm
>>>>
>>>> Remains there in index directory.
>>>>
>>>> Is there any way that such issue does not occur at all or if it
>>>> happens
>>>> we can recover the index data again?
>>>>
>>>> It would be a great help, if some one can.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Chaula
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --------------------------
>>> Grant Ingersoll
>>> http://www.lucidimagination.com
>>>
>>> Lucene Helpful Hints:
>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Chris Hostetter <ho...@fucit.org>.
: i use SimpleFSLockFactory and optimized opened IndexWriter, but i use api to
: forcefully removing the lock file.
: this missing file, just occurs in sometimes not always??
forcibly removing hte lock file isn't something that should be done in a
typical situation ... if the lock file is there, there's a reason for it,
and it's not suprising to me that something might break if you forcibly
remove the lock file while the app is running -- as Michael said, that can
easily lead to two writers both thinking they have access to write to the
index.
http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc/org/apache/lucene/index/IndexWriter.html#unlock(org.apache.lucene.store.Directory)
>Forcibly unlocks the index in the named directory.
>
>Caution: this should only be used by failure recovery code, when it is
>known that no other process nor thread is in fact currently accessing
>this index.
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by mahdi yari <ya...@gmail.com>.
i use SimpleFSLockFactory and optimized opened IndexWriter, but i use api to
forcefully removing the lock file.
this missing file, just occurs in sometimes not always??
On Fri, Oct 17, 2008 at 12:41 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:
>
> When you run the optimize, is it with the already opened IndexWriter on the
> old directory?
>
> Do you use the default locking impl. in Directory (SimpleFSLockFactory)?
> Are you changing the lock directory, or ever forcefully removing the lock
> file (or calling IndexReader/Writer#unlock)?
>
> Most often, an entirely missing file is due to two writers accidentally
> being opened at the same time on the same index.
>
> If you can use IndexWriter.setInfoStream to turn on logging & capture all
> logs leading up to the missing file then I could dig further.
>
> Mike
>
>
> On Oct 17, 2008, at 4:09 AM, mahdi yari wrote:
>
> just one IndexWriter writes on Index and after a specific time(like one
>> day
>> or one week etc), i create a new IndexWriter on new Directory and another
>> thread try to optimize old IndexWirter.
>>
>> On Thu, Oct 16, 2008 at 5:25 PM, Michael McCandless <
>> lucene@mikemccandless.com> wrote:
>>
>>
>>> Can you post the full traceback for your exception, and describe your
>>> indexing process as well?
>>>
>>> Mike
>>>
>>>
>>> mahdi yari wrote:
>>>
>>> hi dears
>>>
>>>> i have same problem
>>>> i indexing on Ubuntu Linux Distro and i have large index (>30G) and
>>>> mergeFactor = 10,
>>>> my Lucene version is 2.2.0
>>>> i think this maybe bug on Lucene 2.2.0
>>>>
>>>> but i get this error sometimes, not always
>>>> thanks alot
>>>>
>>>>
>>>> On Thu, Oct 16, 2008 at 3:01 PM, Chaula Ganatra <cg...@asite.com>
>>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>>>
>>>>> I am again getting the following error while optimization.
>>>>>
>>>>>
>>>>> java.io.FileNotFoundException: \\machine01\indexes\_w5.cfs (The system
>>>>> cannot find the file specified)
>>>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>>>> java.io.RandomAccessFile.open(Native Method)
>>>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>>>> java.io.RandomAccessFile.<init>(Unknown Source)
>>>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>>>>
>>>>> org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.<init>(FSDir
>>>>> ectory.java:506)
>>>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>>>>
>>>>> org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java
>>>>> :536)
>>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>>> org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
>>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>>>
>>>>> org.apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.jav
>>>>> a:70)
>>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>>>
>>>>> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:181)
>>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:167)
>>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:139)
>>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>>>
>>>>> org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:1867)
>>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>>> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1231)
>>>>>
>>>>>
>>>>> If I try to optimize it again then also getting the same error.
>>>>>
>>>>> Can anyone please help me out? It is occurring on live environment.
>>>>>
>>>>>
>>>>> Regards,
>>>>> Chaula
>>>>>
>>>>> -----Original Message-----
>>>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>>>> Sent: 26 September, 2008 8:00 PM
>>>>> To: java-user@lucene.apache.org
>>>>> Subject: Re: How to restore corrupted index
>>>>>
>>>>>
>>>>> It's perfectly fine to have a reader open on an index, while an
>>>>> IndexWriter runs optimize.
>>>>>
>>>>> Which version of Lucene are you using? And which OS & filesystem?
>>>>>
>>>>> Mike
>>>>>
>>>>> Chaula Ganatra wrote:
>>>>>
>>>>> It was the Reader on same index, which I did not close so gave
>>>>>
>>>>>> exception
>>>>>> in writer.optimise()
>>>>>>
>>>>>> Chaula
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>>>>> Sent: 26 September, 2008 7:17 PM
>>>>>> To: java-user@lucene.apache.org
>>>>>> Subject: Re: How to restore corrupted index
>>>>>>
>>>>>>
>>>>>> Can you post the full stack trace in both cases?
>>>>>>
>>>>>> Mike
>>>>>>
>>>>>> Chaula Ganatra wrote:
>>>>>>
>>>>>> I found one case when such multiple files are remained, when we call
>>>>>>
>>>>>>> writer.optimise() it throws exception and multiple files remained in
>>>>>>> index dir.
>>>>>>>
>>>>>>> After such multiple files, when we add document in index by calling
>>>>>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>>>>>
>>>>>>> Regards,
>>>>>>> Chaula
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>>>>>> Sent: 26 September, 2008 6:02 PM
>>>>>>> To: java-user@lucene.apache.org
>>>>>>> Subject: Re: How to restore corrupted index
>>>>>>>
>>>>>>> There is the CheckIndex tool included in the distribution for
>>>>>>> checking/
>>>>>>> fixing bad indexes, but it can't solve everything.
>>>>>>>
>>>>>>> The bigger question is why it is happening to begin with. Can you
>>>>>>> describe your indexing process? How do you know the index is
>>>>>>> actually
>>>>>>> corrupted? Are you seeing exceptions when opening it?
>>>>>>>
>>>>>>> -Grant
>>>>>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>>>>>
>>>>>>> We have an application in which index will be updated frequently.
>>>>>>>
>>>>>>>>
>>>>>>>> During development time, found that index files gets corrupted, i.e.
>>>>>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>>>>>> nrm
>>>>>>>>
>>>>>>>> Remains there in index directory.
>>>>>>>>
>>>>>>>> Is there any way that such issue does not occur at all or if it
>>>>>>>> happens
>>>>>>>> we can recover the index data again?
>>>>>>>>
>>>>>>>> It would be a great help, if some one can.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Chaula
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --------------------------
>>>>>>> Grant Ingersoll
>>>>>>> http://www.lucidimagination.com
>>>>>>>
>>>>>>> Lucene Helpful Hints:
>>>>>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>>>>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
When you run the optimize, is it with the already opened IndexWriter
on the old directory?
Do you use the default locking impl. in Directory
(SimpleFSLockFactory)? Are you changing the lock directory, or ever
forcefully removing the lock file (or calling IndexReader/
Writer#unlock)?
Most often, an entirely missing file is due to two writers
accidentally being opened at the same time on the same index.
If you can use IndexWriter.setInfoStream to turn on logging & capture
all logs leading up to the missing file then I could dig further.
Mike
On Oct 17, 2008, at 4:09 AM, mahdi yari wrote:
> just one IndexWriter writes on Index and after a specific time(like
> one day
> or one week etc), i create a new IndexWriter on new Directory and
> another
> thread try to optimize old IndexWirter.
>
> On Thu, Oct 16, 2008 at 5:25 PM, Michael McCandless <
> lucene@mikemccandless.com> wrote:
>
>>
>> Can you post the full traceback for your exception, and describe your
>> indexing process as well?
>>
>> Mike
>>
>>
>> mahdi yari wrote:
>>
>> hi dears
>>> i have same problem
>>> i indexing on Ubuntu Linux Distro and i have large index (>30G) and
>>> mergeFactor = 10,
>>> my Lucene version is 2.2.0
>>> i think this maybe bug on Lucene 2.2.0
>>>
>>> but i get this error sometimes, not always
>>> thanks alot
>>>
>>>
>>> On Thu, Oct 16, 2008 at 3:01 PM, Chaula Ganatra <cg...@asite.com>
>>> wrote:
>>>
>>> Hi,
>>>>
>>>> I am again getting the following error while optimization.
>>>>
>>>>
>>>> java.io.FileNotFoundException: \\machine01\indexes\_w5.cfs (The
>>>> system
>>>> cannot find the file specified)
>>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>>> java.io.RandomAccessFile.open(Native Method)
>>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>>> java.io.RandomAccessFile.<init>(Unknown Source)
>>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>>> org.apache.lucene.store.FSDirectory$FSIndexInput
>>>> $Descriptor.<init>(FSDir
>>>> ectory.java:506)
>>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>>> org.apache.lucene.store.FSDirectory
>>>> $FSIndexInput.<init>(FSDirectory.java
>>>> :536)
>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>> org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>> org
>>>> .apache
>>>> .lucene.index.CompoundFileReader.<init>(CompoundFileReader.jav
>>>> a:70)
>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>> org
>>>> .apache.lucene.index.SegmentReader.initialize(SegmentReader.java:
>>>> 181)
>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:167)
>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:139)
>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>> org
>>>> .apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:
>>>> 1867)
>>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>>> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1231)
>>>>
>>>>
>>>> If I try to optimize it again then also getting the same error.
>>>>
>>>> Can anyone please help me out? It is occurring on live environment.
>>>>
>>>>
>>>> Regards,
>>>> Chaula
>>>>
>>>> -----Original Message-----
>>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>>> Sent: 26 September, 2008 8:00 PM
>>>> To: java-user@lucene.apache.org
>>>> Subject: Re: How to restore corrupted index
>>>>
>>>>
>>>> It's perfectly fine to have a reader open on an index, while an
>>>> IndexWriter runs optimize.
>>>>
>>>> Which version of Lucene are you using? And which OS & filesystem?
>>>>
>>>> Mike
>>>>
>>>> Chaula Ganatra wrote:
>>>>
>>>> It was the Reader on same index, which I did not close so gave
>>>>> exception
>>>>> in writer.optimise()
>>>>>
>>>>> Chaula
>>>>>
>>>>> -----Original Message-----
>>>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>>>> Sent: 26 September, 2008 7:17 PM
>>>>> To: java-user@lucene.apache.org
>>>>> Subject: Re: How to restore corrupted index
>>>>>
>>>>>
>>>>> Can you post the full stack trace in both cases?
>>>>>
>>>>> Mike
>>>>>
>>>>> Chaula Ganatra wrote:
>>>>>
>>>>> I found one case when such multiple files are remained, when we
>>>>> call
>>>>>> writer.optimise() it throws exception and multiple files
>>>>>> remained in
>>>>>> index dir.
>>>>>>
>>>>>> After such multiple files, when we add document in index by
>>>>>> calling
>>>>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>>>>
>>>>>> Regards,
>>>>>> Chaula
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>>>>> Sent: 26 September, 2008 6:02 PM
>>>>>> To: java-user@lucene.apache.org
>>>>>> Subject: Re: How to restore corrupted index
>>>>>>
>>>>>> There is the CheckIndex tool included in the distribution for
>>>>>> checking/
>>>>>> fixing bad indexes, but it can't solve everything.
>>>>>>
>>>>>> The bigger question is why it is happening to begin with. Can
>>>>>> you
>>>>>> describe your indexing process? How do you know the index is
>>>>>> actually
>>>>>> corrupted? Are you seeing exceptions when opening it?
>>>>>>
>>>>>> -Grant
>>>>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>>>>
>>>>>> We have an application in which index will be updated frequently.
>>>>>>>
>>>>>>> During development time, found that index files gets
>>>>>>> corrupted, i.e.
>>>>>>> more than one cfs files,some other extension files e.g. frq,
>>>>>>> fnm,
>>>>>>> nrm
>>>>>>>
>>>>>>> Remains there in index directory.
>>>>>>>
>>>>>>> Is there any way that such issue does not occur at all or if it
>>>>>>> happens
>>>>>>> we can recover the index data again?
>>>>>>>
>>>>>>> It would be a great help, if some one can.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Chaula
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --------------------------
>>>>>> Grant Ingersoll
>>>>>> http://www.lucidimagination.com
>>>>>>
>>>>>> Lucene Helpful Hints:
>>>>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>>>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by mahdi yari <ya...@gmail.com>.
just one IndexWriter writes on Index and after a specific time(like one day
or one week etc), i create a new IndexWriter on new Directory and another
thread try to optimize old IndexWirter.
On Thu, Oct 16, 2008 at 5:25 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:
>
> Can you post the full traceback for your exception, and describe your
> indexing process as well?
>
> Mike
>
>
> mahdi yari wrote:
>
> hi dears
>> i have same problem
>> i indexing on Ubuntu Linux Distro and i have large index (>30G) and
>> mergeFactor = 10,
>> my Lucene version is 2.2.0
>> i think this maybe bug on Lucene 2.2.0
>>
>> but i get this error sometimes, not always
>> thanks alot
>>
>>
>> On Thu, Oct 16, 2008 at 3:01 PM, Chaula Ganatra <cg...@asite.com>
>> wrote:
>>
>> Hi,
>>>
>>> I am again getting the following error while optimization.
>>>
>>>
>>> java.io.FileNotFoundException: \\machine01\indexes\_w5.cfs (The system
>>> cannot find the file specified)
>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>> java.io.RandomAccessFile.open(Native Method)
>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>> java.io.RandomAccessFile.<init>(Unknown Source)
>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>> org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.<init>(FSDir
>>> ectory.java:506)
>>> 16:20:57,533 INFO [STDOUT] : 140 at
>>> org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java
>>> :536)
>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>> org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>> org.apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.jav
>>> a:70)
>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:181)
>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:167)
>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:139)
>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>> org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:1867)
>>> 16:20:57,565 INFO [STDOUT] : 140 at
>>> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1231)
>>>
>>>
>>> If I try to optimize it again then also getting the same error.
>>>
>>> Can anyone please help me out? It is occurring on live environment.
>>>
>>>
>>> Regards,
>>> Chaula
>>>
>>> -----Original Message-----
>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>> Sent: 26 September, 2008 8:00 PM
>>> To: java-user@lucene.apache.org
>>> Subject: Re: How to restore corrupted index
>>>
>>>
>>> It's perfectly fine to have a reader open on an index, while an
>>> IndexWriter runs optimize.
>>>
>>> Which version of Lucene are you using? And which OS & filesystem?
>>>
>>> Mike
>>>
>>> Chaula Ganatra wrote:
>>>
>>> It was the Reader on same index, which I did not close so gave
>>>> exception
>>>> in writer.optimise()
>>>>
>>>> Chaula
>>>>
>>>> -----Original Message-----
>>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>>> Sent: 26 September, 2008 7:17 PM
>>>> To: java-user@lucene.apache.org
>>>> Subject: Re: How to restore corrupted index
>>>>
>>>>
>>>> Can you post the full stack trace in both cases?
>>>>
>>>> Mike
>>>>
>>>> Chaula Ganatra wrote:
>>>>
>>>> I found one case when such multiple files are remained, when we call
>>>>> writer.optimise() it throws exception and multiple files remained in
>>>>> index dir.
>>>>>
>>>>> After such multiple files, when we add document in index by calling
>>>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>>>
>>>>> Regards,
>>>>> Chaula
>>>>>
>>>>> -----Original Message-----
>>>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>>>> Sent: 26 September, 2008 6:02 PM
>>>>> To: java-user@lucene.apache.org
>>>>> Subject: Re: How to restore corrupted index
>>>>>
>>>>> There is the CheckIndex tool included in the distribution for
>>>>> checking/
>>>>> fixing bad indexes, but it can't solve everything.
>>>>>
>>>>> The bigger question is why it is happening to begin with. Can you
>>>>> describe your indexing process? How do you know the index is
>>>>> actually
>>>>> corrupted? Are you seeing exceptions when opening it?
>>>>>
>>>>> -Grant
>>>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>>>
>>>>> We have an application in which index will be updated frequently.
>>>>>>
>>>>>> During development time, found that index files gets corrupted, i.e.
>>>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>>>> nrm
>>>>>>
>>>>>> Remains there in index directory.
>>>>>>
>>>>>> Is there any way that such issue does not occur at all or if it
>>>>>> happens
>>>>>> we can recover the index data again?
>>>>>>
>>>>>> It would be a great help, if some one can.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Chaula
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --------------------------
>>>>> Grant Ingersoll
>>>>> http://www.lucidimagination.com
>>>>>
>>>>> Lucene Helpful Hints:
>>>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
Can you post the full traceback for your exception, and describe your
indexing process as well?
Mike
mahdi yari wrote:
> hi dears
> i have same problem
> i indexing on Ubuntu Linux Distro and i have large index (>30G) and
> mergeFactor = 10,
> my Lucene version is 2.2.0
> i think this maybe bug on Lucene 2.2.0
>
> but i get this error sometimes, not always
> thanks alot
>
>
> On Thu, Oct 16, 2008 at 3:01 PM, Chaula Ganatra <cg...@asite.com>
> wrote:
>
>> Hi,
>>
>> I am again getting the following error while optimization.
>>
>>
>> java.io.FileNotFoundException: \\machine01\indexes\_w5.cfs (The
>> system
>> cannot find the file specified)
>> 16:20:57,533 INFO [STDOUT] : 140 at
>> java.io.RandomAccessFile.open(Native Method)
>> 16:20:57,533 INFO [STDOUT] : 140 at
>> java.io.RandomAccessFile.<init>(Unknown Source)
>> 16:20:57,533 INFO [STDOUT] : 140 at
>> org.apache.lucene.store.FSDirectory$FSIndexInput
>> $Descriptor.<init>(FSDir
>> ectory.java:506)
>> 16:20:57,533 INFO [STDOUT] : 140 at
>> org.apache.lucene.store.FSDirectory
>> $FSIndexInput.<init>(FSDirectory.java
>> :536)
>> 16:20:57,565 INFO [STDOUT] : 140 at
>> org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
>> 16:20:57,565 INFO [STDOUT] : 140 at
>> org
>> .apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.jav
>> a:70)
>> 16:20:57,565 INFO [STDOUT] : 140 at
>> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:
>> 181)
>> 16:20:57,565 INFO [STDOUT] : 140 at
>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:167)
>> 16:20:57,565 INFO [STDOUT] : 140 at
>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:139)
>> 16:20:57,565 INFO [STDOUT] : 140 at
>> org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:
>> 1867)
>> 16:20:57,565 INFO [STDOUT] : 140 at
>> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1231)
>>
>>
>> If I try to optimize it again then also getting the same error.
>>
>> Can anyone please help me out? It is occurring on live environment.
>>
>>
>> Regards,
>> Chaula
>>
>> -----Original Message-----
>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: 26 September, 2008 8:00 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: How to restore corrupted index
>>
>>
>> It's perfectly fine to have a reader open on an index, while an
>> IndexWriter runs optimize.
>>
>> Which version of Lucene are you using? And which OS & filesystem?
>>
>> Mike
>>
>> Chaula Ganatra wrote:
>>
>>> It was the Reader on same index, which I did not close so gave
>>> exception
>>> in writer.optimise()
>>>
>>> Chaula
>>>
>>> -----Original Message-----
>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>> Sent: 26 September, 2008 7:17 PM
>>> To: java-user@lucene.apache.org
>>> Subject: Re: How to restore corrupted index
>>>
>>>
>>> Can you post the full stack trace in both cases?
>>>
>>> Mike
>>>
>>> Chaula Ganatra wrote:
>>>
>>>> I found one case when such multiple files are remained, when we
>>>> call
>>>> writer.optimise() it throws exception and multiple files remained
>>>> in
>>>> index dir.
>>>>
>>>> After such multiple files, when we add document in index by calling
>>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>>
>>>> Regards,
>>>> Chaula
>>>>
>>>> -----Original Message-----
>>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>>> Sent: 26 September, 2008 6:02 PM
>>>> To: java-user@lucene.apache.org
>>>> Subject: Re: How to restore corrupted index
>>>>
>>>> There is the CheckIndex tool included in the distribution for
>>>> checking/
>>>> fixing bad indexes, but it can't solve everything.
>>>>
>>>> The bigger question is why it is happening to begin with. Can you
>>>> describe your indexing process? How do you know the index is
>>>> actually
>>>> corrupted? Are you seeing exceptions when opening it?
>>>>
>>>> -Grant
>>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>>
>>>>> We have an application in which index will be updated frequently.
>>>>>
>>>>> During development time, found that index files gets corrupted,
>>>>> i.e.
>>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>>> nrm
>>>>>
>>>>> Remains there in index directory.
>>>>>
>>>>> Is there any way that such issue does not occur at all or if it
>>>>> happens
>>>>> we can recover the index data again?
>>>>>
>>>>> It would be a great help, if some one can.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Chaula
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --------------------------
>>>> Grant Ingersoll
>>>> http://www.lucidimagination.com
>>>>
>>>> Lucene Helpful Hints:
>>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by mahdi yari <ya...@gmail.com>.
hi dears
i have same problem
i indexing on Ubuntu Linux Distro and i have large index (>30G) and
mergeFactor = 10,
my Lucene version is 2.2.0
i think this maybe bug on Lucene 2.2.0
but i get this error sometimes, not always
thanks alot
On Thu, Oct 16, 2008 at 3:01 PM, Chaula Ganatra <cg...@asite.com> wrote:
> Hi,
>
> I am again getting the following error while optimization.
>
>
> java.io.FileNotFoundException: \\machine01\indexes\_w5.cfs (The system
> cannot find the file specified)
> 16:20:57,533 INFO [STDOUT] : 140 at
> java.io.RandomAccessFile.open(Native Method)
> 16:20:57,533 INFO [STDOUT] : 140 at
> java.io.RandomAccessFile.<init>(Unknown Source)
> 16:20:57,533 INFO [STDOUT] : 140 at
> org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.<init>(FSDir
> ectory.java:506)
> 16:20:57,533 INFO [STDOUT] : 140 at
> org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java
> :536)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.jav
> a:70)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:181)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:167)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:139)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:1867)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1231)
>
>
> If I try to optimize it again then also getting the same error.
>
> Can anyone please help me out? It is occurring on live environment.
>
>
> Regards,
> Chaula
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: 26 September, 2008 8:00 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
>
> It's perfectly fine to have a reader open on an index, while an
> IndexWriter runs optimize.
>
> Which version of Lucene are you using? And which OS & filesystem?
>
> Mike
>
> Chaula Ganatra wrote:
>
> > It was the Reader on same index, which I did not close so gave
> > exception
> > in writer.optimise()
> >
> > Chaula
> >
> > -----Original Message-----
> > From: Michael McCandless [mailto:lucene@mikemccandless.com]
> > Sent: 26 September, 2008 7:17 PM
> > To: java-user@lucene.apache.org
> > Subject: Re: How to restore corrupted index
> >
> >
> > Can you post the full stack trace in both cases?
> >
> > Mike
> >
> > Chaula Ganatra wrote:
> >
> >> I found one case when such multiple files are remained, when we call
> >> writer.optimise() it throws exception and multiple files remained in
> >> index dir.
> >>
> >> After such multiple files, when we add document in index by calling
> >> writer.addDocument it throws java.lang.NegativeArraySizeException
> >>
> >> Regards,
> >> Chaula
> >>
> >> -----Original Message-----
> >> From: Grant Ingersoll [mailto:gsingers@apache.org]
> >> Sent: 26 September, 2008 6:02 PM
> >> To: java-user@lucene.apache.org
> >> Subject: Re: How to restore corrupted index
> >>
> >> There is the CheckIndex tool included in the distribution for
> >> checking/
> >> fixing bad indexes, but it can't solve everything.
> >>
> >> The bigger question is why it is happening to begin with. Can you
> >> describe your indexing process? How do you know the index is
> >> actually
> >> corrupted? Are you seeing exceptions when opening it?
> >>
> >> -Grant
> >> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
> >>
> >>> We have an application in which index will be updated frequently.
> >>>
> >>> During development time, found that index files gets corrupted, i.e.
> >>> more than one cfs files,some other extension files e.g. frq, fnm,
> >>> nrm
> >>>
> >>> Remains there in index directory.
> >>>
> >>> Is there any way that such issue does not occur at all or if it
> >>> happens
> >>> we can recover the index data again?
> >>>
> >>> It would be a great help, if some one can.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Regards,
> >>>
> >>> Chaula
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >> --------------------------
> >> Grant Ingersoll
> >> http://www.lucidimagination.com
> >>
> >> Lucene Helpful Hints:
> >> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> >> http://wiki.apache.org/lucene-java/LuceneFAQ
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
Chaula Ganatra wrote:
> We are using 2.2.0 and at least for our coming release we will be
> using
> the same, we will upgrade to the latest one after that. So is it a bug
> in 2.2.0.
I can't tell if this is a bug yet... I need more details, like the
stack traces, but
also more details about how you are using Lucene. Can you post the
parts
of your source code that actually do the indexing/searching?
If you could reduce this to a small test case that shows one or both of
the exceptions then I can track down what's happening.
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: How to restore corrupted index
Posted by Chaula Ganatra <cg...@asite.com>.
We are using 2.2.0 and at least for our coming release we will be using
the same, we will upgrade to the latest one after that. So is it a bug
in 2.2.0.
I will reproduce it and send a trace
Chaula
-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com]
Sent: 26 September, 2008 9:50 PM
To: java-user@lucene.apache.org
Subject: Re: How to restore corrupted index
OK. I really need to see those stack traces to better understand this
issue.
Also, does the issue still happen on 2.3, or 2.4 RC2?
Mike
Chaula Ganatra wrote:
> Lucene 2.2.0, windows XP
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: 26 September, 2008 8:00 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
>
> It's perfectly fine to have a reader open on an index, while an
> IndexWriter runs optimize.
>
> Which version of Lucene are you using? And which OS & filesystem?
>
> Mike
>
> Chaula Ganatra wrote:
>
>> It was the Reader on same index, which I did not close so gave
>> exception
>> in writer.optimise()
>>
>> Chaula
>>
>> -----Original Message-----
>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: 26 September, 2008 7:17 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: How to restore corrupted index
>>
>>
>> Can you post the full stack trace in both cases?
>>
>> Mike
>>
>> Chaula Ganatra wrote:
>>
>>> I found one case when such multiple files are remained, when we call
>>> writer.optimise() it throws exception and multiple files remained in
>>> index dir.
>>>
>>> After such multiple files, when we add document in index by calling
>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>
>>> Regards,
>>> Chaula
>>>
>>> -----Original Message-----
>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>> Sent: 26 September, 2008 6:02 PM
>>> To: java-user@lucene.apache.org
>>> Subject: Re: How to restore corrupted index
>>>
>>> There is the CheckIndex tool included in the distribution for
>>> checking/
>>> fixing bad indexes, but it can't solve everything.
>>>
>>> The bigger question is why it is happening to begin with. Can you
>>> describe your indexing process? How do you know the index is
>>> actually
>>> corrupted? Are you seeing exceptions when opening it?
>>>
>>> -Grant
>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>
>>>> We have an application in which index will be updated frequently.
>>>>
>>>> During development time, found that index files gets corrupted,
>>>> i.e.
>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>> nrm
>>>>
>>>> Remains there in index directory.
>>>>
>>>> Is there any way that such issue does not occur at all or if it
>>>> happens
>>>> we can recover the index data again?
>>>>
>>>> It would be a great help, if some one can.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Chaula
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --------------------------
>>> Grant Ingersoll
>>> http://www.lucidimagination.com
>>>
>>> Lucene Helpful Hints:
>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
OK. I really need to see those stack traces to better understand this
issue.
Also, does the issue still happen on 2.3, or 2.4 RC2?
Mike
Chaula Ganatra wrote:
> Lucene 2.2.0, windows XP
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: 26 September, 2008 8:00 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
>
> It's perfectly fine to have a reader open on an index, while an
> IndexWriter runs optimize.
>
> Which version of Lucene are you using? And which OS & filesystem?
>
> Mike
>
> Chaula Ganatra wrote:
>
>> It was the Reader on same index, which I did not close so gave
>> exception
>> in writer.optimise()
>>
>> Chaula
>>
>> -----Original Message-----
>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: 26 September, 2008 7:17 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: How to restore corrupted index
>>
>>
>> Can you post the full stack trace in both cases?
>>
>> Mike
>>
>> Chaula Ganatra wrote:
>>
>>> I found one case when such multiple files are remained, when we call
>>> writer.optimise() it throws exception and multiple files remained in
>>> index dir.
>>>
>>> After such multiple files, when we add document in index by calling
>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>
>>> Regards,
>>> Chaula
>>>
>>> -----Original Message-----
>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>> Sent: 26 September, 2008 6:02 PM
>>> To: java-user@lucene.apache.org
>>> Subject: Re: How to restore corrupted index
>>>
>>> There is the CheckIndex tool included in the distribution for
>>> checking/
>>> fixing bad indexes, but it can't solve everything.
>>>
>>> The bigger question is why it is happening to begin with. Can you
>>> describe your indexing process? How do you know the index is
>>> actually
>>> corrupted? Are you seeing exceptions when opening it?
>>>
>>> -Grant
>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>
>>>> We have an application in which index will be updated frequently.
>>>>
>>>> During development time, found that index files gets corrupted,
>>>> i.e.
>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>> nrm
>>>>
>>>> Remains there in index directory.
>>>>
>>>> Is there any way that such issue does not occur at all or if it
>>>> happens
>>>> we can recover the index data again?
>>>>
>>>> It would be a great help, if some one can.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Chaula
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --------------------------
>>> Grant Ingersoll
>>> http://www.lucidimagination.com
>>>
>>> Lucene Helpful Hints:
>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: How to restore corrupted index
Posted by Chaula Ganatra <cg...@asite.com>.
Lucene 2.2.0, windows XP
-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com]
Sent: 26 September, 2008 8:00 PM
To: java-user@lucene.apache.org
Subject: Re: How to restore corrupted index
It's perfectly fine to have a reader open on an index, while an
IndexWriter runs optimize.
Which version of Lucene are you using? And which OS & filesystem?
Mike
Chaula Ganatra wrote:
> It was the Reader on same index, which I did not close so gave
> exception
> in writer.optimise()
>
> Chaula
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: 26 September, 2008 7:17 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
>
> Can you post the full stack trace in both cases?
>
> Mike
>
> Chaula Ganatra wrote:
>
>> I found one case when such multiple files are remained, when we call
>> writer.optimise() it throws exception and multiple files remained in
>> index dir.
>>
>> After such multiple files, when we add document in index by calling
>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>
>> Regards,
>> Chaula
>>
>> -----Original Message-----
>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>> Sent: 26 September, 2008 6:02 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: How to restore corrupted index
>>
>> There is the CheckIndex tool included in the distribution for
>> checking/
>> fixing bad indexes, but it can't solve everything.
>>
>> The bigger question is why it is happening to begin with. Can you
>> describe your indexing process? How do you know the index is
>> actually
>> corrupted? Are you seeing exceptions when opening it?
>>
>> -Grant
>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>
>>> We have an application in which index will be updated frequently.
>>>
>>> During development time, found that index files gets corrupted, i.e.
>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>> nrm
>>>
>>> Remains there in index directory.
>>>
>>> Is there any way that such issue does not occur at all or if it
>>> happens
>>> we can recover the index data again?
>>>
>>> It would be a great help, if some one can.
>>>
>>>
>>>
>>>
>>>
>>> Regards,
>>>
>>> Chaula
>>>
>>>
>>>
>>>
>>>
>>
>> --------------------------
>> Grant Ingersoll
>> http://www.lucidimagination.com
>>
>> Lucene Helpful Hints:
>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
You should run CheckIndex to quickly get back to a usable index, but
it will remove any segments that have problems loading.
But... I'd like to get to the root cause here.
It looks like this is Lucene 2.2.0.
Somehow the file _w5.cfs is entirely missing.
Can you describe how your indexing process works? Do you copy your
index after using IndexWriter?
Is it at all possible two IndexWriters are in use against the same
directory? Can multiple machines do indexing against this directory?
(It looks like (since you're using a UNC path) you have an IndexWriter
open on a remote computer's directory.)
Mike
Chaula Ganatra wrote:
> Hi,
>
> I am again getting the following error while optimization.
>
>
> java.io.FileNotFoundException: \\machine01\indexes\_w5.cfs (The system
> cannot find the file specified)
> 16:20:57,533 INFO [STDOUT] : 140 at
> java.io.RandomAccessFile.open(Native Method)
> 16:20:57,533 INFO [STDOUT] : 140 at
> java.io.RandomAccessFile.<init>(Unknown Source)
> 16:20:57,533 INFO [STDOUT] : 140 at
> org.apache.lucene.store.FSDirectory$FSIndexInput
> $Descriptor.<init>(FSDir
> ectory.java:506)
> 16:20:57,533 INFO [STDOUT] : 140 at
> org.apache.lucene.store.FSDirectory
> $FSIndexInput.<init>(FSDirectory.java
> :536)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org
> .apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.jav
> a:70)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:
> 181)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:167)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:139)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:
> 1867)
> 16:20:57,565 INFO [STDOUT] : 140 at
> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1231)
>
>
> If I try to optimize it again then also getting the same error.
>
> Can anyone please help me out? It is occurring on live environment.
>
>
> Regards,
> Chaula
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: 26 September, 2008 8:00 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
>
> It's perfectly fine to have a reader open on an index, while an
> IndexWriter runs optimize.
>
> Which version of Lucene are you using? And which OS & filesystem?
>
> Mike
>
> Chaula Ganatra wrote:
>
>> It was the Reader on same index, which I did not close so gave
>> exception
>> in writer.optimise()
>>
>> Chaula
>>
>> -----Original Message-----
>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: 26 September, 2008 7:17 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: How to restore corrupted index
>>
>>
>> Can you post the full stack trace in both cases?
>>
>> Mike
>>
>> Chaula Ganatra wrote:
>>
>>> I found one case when such multiple files are remained, when we call
>>> writer.optimise() it throws exception and multiple files remained in
>>> index dir.
>>>
>>> After such multiple files, when we add document in index by calling
>>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>>
>>> Regards,
>>> Chaula
>>>
>>> -----Original Message-----
>>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>>> Sent: 26 September, 2008 6:02 PM
>>> To: java-user@lucene.apache.org
>>> Subject: Re: How to restore corrupted index
>>>
>>> There is the CheckIndex tool included in the distribution for
>>> checking/
>>> fixing bad indexes, but it can't solve everything.
>>>
>>> The bigger question is why it is happening to begin with. Can you
>>> describe your indexing process? How do you know the index is
>>> actually
>>> corrupted? Are you seeing exceptions when opening it?
>>>
>>> -Grant
>>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>>
>>>> We have an application in which index will be updated frequently.
>>>>
>>>> During development time, found that index files gets corrupted,
>>>> i.e.
>>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>>> nrm
>>>>
>>>> Remains there in index directory.
>>>>
>>>> Is there any way that such issue does not occur at all or if it
>>>> happens
>>>> we can recover the index data again?
>>>>
>>>> It would be a great help, if some one can.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Chaula
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --------------------------
>>> Grant Ingersoll
>>> http://www.lucidimagination.com
>>>
>>> Lucene Helpful Hints:
>>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: How to restore corrupted index
Posted by Chaula Ganatra <cg...@asite.com>.
Hi,
I am again getting the following error while optimization.
java.io.FileNotFoundException: \\machine01\indexes\_w5.cfs (The system
cannot find the file specified)
16:20:57,533 INFO [STDOUT] : 140 at
java.io.RandomAccessFile.open(Native Method)
16:20:57,533 INFO [STDOUT] : 140 at
java.io.RandomAccessFile.<init>(Unknown Source)
16:20:57,533 INFO [STDOUT] : 140 at
org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.<init>(FSDir
ectory.java:506)
16:20:57,533 INFO [STDOUT] : 140 at
org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java
:536)
16:20:57,565 INFO [STDOUT] : 140 at
org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
16:20:57,565 INFO [STDOUT] : 140 at
org.apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.jav
a:70)
16:20:57,565 INFO [STDOUT] : 140 at
org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:181)
16:20:57,565 INFO [STDOUT] : 140 at
org.apache.lucene.index.SegmentReader.get(SegmentReader.java:167)
16:20:57,565 INFO [STDOUT] : 140 at
org.apache.lucene.index.SegmentReader.get(SegmentReader.java:139)
16:20:57,565 INFO [STDOUT] : 140 at
org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:1867)
16:20:57,565 INFO [STDOUT] : 140 at
org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1231)
If I try to optimize it again then also getting the same error.
Can anyone please help me out? It is occurring on live environment.
Regards,
Chaula
-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com]
Sent: 26 September, 2008 8:00 PM
To: java-user@lucene.apache.org
Subject: Re: How to restore corrupted index
It's perfectly fine to have a reader open on an index, while an
IndexWriter runs optimize.
Which version of Lucene are you using? And which OS & filesystem?
Mike
Chaula Ganatra wrote:
> It was the Reader on same index, which I did not close so gave
> exception
> in writer.optimise()
>
> Chaula
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: 26 September, 2008 7:17 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
>
> Can you post the full stack trace in both cases?
>
> Mike
>
> Chaula Ganatra wrote:
>
>> I found one case when such multiple files are remained, when we call
>> writer.optimise() it throws exception and multiple files remained in
>> index dir.
>>
>> After such multiple files, when we add document in index by calling
>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>
>> Regards,
>> Chaula
>>
>> -----Original Message-----
>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>> Sent: 26 September, 2008 6:02 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: How to restore corrupted index
>>
>> There is the CheckIndex tool included in the distribution for
>> checking/
>> fixing bad indexes, but it can't solve everything.
>>
>> The bigger question is why it is happening to begin with. Can you
>> describe your indexing process? How do you know the index is
>> actually
>> corrupted? Are you seeing exceptions when opening it?
>>
>> -Grant
>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>
>>> We have an application in which index will be updated frequently.
>>>
>>> During development time, found that index files gets corrupted, i.e.
>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>> nrm
>>>
>>> Remains there in index directory.
>>>
>>> Is there any way that such issue does not occur at all or if it
>>> happens
>>> we can recover the index data again?
>>>
>>> It would be a great help, if some one can.
>>>
>>>
>>>
>>>
>>>
>>> Regards,
>>>
>>> Chaula
>>>
>>>
>>>
>>>
>>>
>>
>> --------------------------
>> Grant Ingersoll
>> http://www.lucidimagination.com
>>
>> Lucene Helpful Hints:
>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
It's perfectly fine to have a reader open on an index, while an
IndexWriter runs optimize.
Which version of Lucene are you using? And which OS & filesystem?
Mike
Chaula Ganatra wrote:
> It was the Reader on same index, which I did not close so gave
> exception
> in writer.optimise()
>
> Chaula
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: 26 September, 2008 7:17 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
>
> Can you post the full stack trace in both cases?
>
> Mike
>
> Chaula Ganatra wrote:
>
>> I found one case when such multiple files are remained, when we call
>> writer.optimise() it throws exception and multiple files remained in
>> index dir.
>>
>> After such multiple files, when we add document in index by calling
>> writer.addDocument it throws java.lang.NegativeArraySizeException
>>
>> Regards,
>> Chaula
>>
>> -----Original Message-----
>> From: Grant Ingersoll [mailto:gsingers@apache.org]
>> Sent: 26 September, 2008 6:02 PM
>> To: java-user@lucene.apache.org
>> Subject: Re: How to restore corrupted index
>>
>> There is the CheckIndex tool included in the distribution for
>> checking/
>> fixing bad indexes, but it can't solve everything.
>>
>> The bigger question is why it is happening to begin with. Can you
>> describe your indexing process? How do you know the index is
>> actually
>> corrupted? Are you seeing exceptions when opening it?
>>
>> -Grant
>> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>>
>>> We have an application in which index will be updated frequently.
>>>
>>> During development time, found that index files gets corrupted, i.e.
>>> more than one cfs files,some other extension files e.g. frq, fnm,
>>> nrm
>>>
>>> Remains there in index directory.
>>>
>>> Is there any way that such issue does not occur at all or if it
>>> happens
>>> we can recover the index data again?
>>>
>>> It would be a great help, if some one can.
>>>
>>>
>>>
>>>
>>>
>>> Regards,
>>>
>>> Chaula
>>>
>>>
>>>
>>>
>>>
>>
>> --------------------------
>> Grant Ingersoll
>> http://www.lucidimagination.com
>>
>> Lucene Helpful Hints:
>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: How to restore corrupted index
Posted by Chaula Ganatra <cg...@asite.com>.
It was the Reader on same index, which I did not close so gave exception
in writer.optimise()
Chaula
-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com]
Sent: 26 September, 2008 7:17 PM
To: java-user@lucene.apache.org
Subject: Re: How to restore corrupted index
Can you post the full stack trace in both cases?
Mike
Chaula Ganatra wrote:
> I found one case when such multiple files are remained, when we call
> writer.optimise() it throws exception and multiple files remained in
> index dir.
>
> After such multiple files, when we add document in index by calling
> writer.addDocument it throws java.lang.NegativeArraySizeException
>
> Regards,
> Chaula
>
> -----Original Message-----
> From: Grant Ingersoll [mailto:gsingers@apache.org]
> Sent: 26 September, 2008 6:02 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
> There is the CheckIndex tool included in the distribution for
> checking/
> fixing bad indexes, but it can't solve everything.
>
> The bigger question is why it is happening to begin with. Can you
> describe your indexing process? How do you know the index is actually
> corrupted? Are you seeing exceptions when opening it?
>
> -Grant
> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>
>> We have an application in which index will be updated frequently.
>>
>> During development time, found that index files gets corrupted, i.e.
>> more than one cfs files,some other extension files e.g. frq, fnm,
>> nrm
>>
>> Remains there in index directory.
>>
>> Is there any way that such issue does not occur at all or if it
>> happens
>> we can recover the index data again?
>>
>> It would be a great help, if some one can.
>>
>>
>>
>>
>>
>> Regards,
>>
>> Chaula
>>
>>
>>
>>
>>
>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Michael McCandless <lu...@mikemccandless.com>.
Can you post the full stack trace in both cases?
Mike
Chaula Ganatra wrote:
> I found one case when such multiple files are remained, when we call
> writer.optimise() it throws exception and multiple files remained in
> index dir.
>
> After such multiple files, when we add document in index by calling
> writer.addDocument it throws java.lang.NegativeArraySizeException
>
> Regards,
> Chaula
>
> -----Original Message-----
> From: Grant Ingersoll [mailto:gsingers@apache.org]
> Sent: 26 September, 2008 6:02 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to restore corrupted index
>
> There is the CheckIndex tool included in the distribution for
> checking/
> fixing bad indexes, but it can't solve everything.
>
> The bigger question is why it is happening to begin with. Can you
> describe your indexing process? How do you know the index is actually
> corrupted? Are you seeing exceptions when opening it?
>
> -Grant
> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
>
>> We have an application in which index will be updated frequently.
>>
>> During development time, found that index files gets corrupted, i.e.
>> more than one cfs files,some other extension files e.g. frq, fnm,
>> nrm
>>
>> Remains there in index directory.
>>
>> Is there any way that such issue does not occur at all or if it
>> happens
>> we can recover the index data again?
>>
>> It would be a great help, if some one can.
>>
>>
>>
>>
>>
>> Regards,
>>
>> Chaula
>>
>>
>>
>>
>>
>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: How to restore corrupted index
Posted by Chaula Ganatra <cg...@asite.com>.
I found one case when such multiple files are remained, when we call
writer.optimise() it throws exception and multiple files remained in
index dir.
After such multiple files, when we add document in index by calling
writer.addDocument it throws java.lang.NegativeArraySizeException
Regards,
Chaula
-----Original Message-----
From: Grant Ingersoll [mailto:gsingers@apache.org]
Sent: 26 September, 2008 6:02 PM
To: java-user@lucene.apache.org
Subject: Re: How to restore corrupted index
There is the CheckIndex tool included in the distribution for checking/
fixing bad indexes, but it can't solve everything.
The bigger question is why it is happening to begin with. Can you
describe your indexing process? How do you know the index is actually
corrupted? Are you seeing exceptions when opening it?
-Grant
On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
> We have an application in which index will be updated frequently.
>
> During development time, found that index files gets corrupted, i.e.
> more than one cfs files,some other extension files e.g. frq, fnm, nrm
>
> Remains there in index directory.
>
> Is there any way that such issue does not occur at all or if it
> happens
> we can recover the index data again?
>
> It would be a great help, if some one can.
>
>
>
>
>
> Regards,
>
> Chaula
>
>
>
>
>
--------------------------
Grant Ingersoll
http://www.lucidimagination.com
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Grant Ingersoll <gs...@apache.org>.
There is the CheckIndex tool included in the distribution for checking/
fixing bad indexes, but it can't solve everything.
The bigger question is why it is happening to begin with. Can you
describe your indexing process? How do you know the index is actually
corrupted? Are you seeing exceptions when opening it?
-Grant
On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote:
> We have an application in which index will be updated frequently.
>
> During development time, found that index files gets corrupted, i.e.
> more than one cfs files,some other extension files e.g. frq, fnm, nrm
>
> Remains there in index directory.
>
> Is there any way that such issue does not occur at all or if it
> happens
> we can recover the index data again?
>
> It would be a great help, if some one can.
>
>
>
>
>
> Regards,
>
> Chaula
>
>
>
>
>
--------------------------
Grant Ingersoll
http://www.lucidimagination.com
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: How to restore corrupted index
Posted by Erick Erickson <er...@gmail.com>.
You say that there are multiple files, but you don't say if the index
still works. Does it? If using the index gives you unexpected results,
can you tell us about what the failure modes are?
Best
Erick
On Fri, Sep 26, 2008 at 6:49 AM, Chaula Ganatra <cg...@asite.com> wrote:
> We have an application in which index will be updated frequently.
>
> During development time, found that index files gets corrupted, i.e.
> more than one cfs files,some other extension files e.g. frq, fnm, nrm
>
> Remains there in index directory.
>
> Is there any way that such issue does not occur at all or if it happens
> we can recover the index data again?
>
> It would be a great help, if some one can.
>
>
>
>
>
> Regards,
>
> Chaula
>
>
>
>
>
>