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 Atul Prajapati <ap...@asite.com> on 2011/01/03 07:03:57 UTC

IOException in updateDocument(term, document) method of IndexWriter

Hi,

 

we are calling updateDocument(term, document) method on IndexWriter and
after that we are calling close() method of indexWriter.

 

In Close() method i got the following IO exception.

 

\\server01\files\luceneIndex\_c.cfs (The process cannot access the file
because it is being used by another process)

 

Ni this case index writer was created successfully and it acquired lock
for that directory and due to above exception the lock file was not
removed.

 

Is there any chances that _c.cfs file is used by any other process
because index writer already acquires lock on that directory?

 

Is there any way to handle such scenario ?

 

 

Lucene Version : 3.0.2

OS : Windows Server 2003 64 bit

 

 

Thanks,

Atul


RE: IOException in updateDocument(term, document) method of IndexWriter

Posted by Atul Prajapati <ap...@asite.com>.
Hi,

Right now we don't have full stack trace for this exception and this
issue is not easily replicable. We have updated our code to log full
stack trace and once we get this replicated i will post the full stack
trace here.

If anyone have any idea about this then please let us know so we can
investigate it further in that direction.

Thanks,
Atul

-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com] 
Sent: Monday, January 03, 2011 4:52 PM
To: java-user@lucene.apache.org
Subject: Re: IOException in updateDocument(term, document) method of
IndexWriter

Can you post the full exception that you hit?

And maybe a standalone test case showing the problem?

Mike

On Mon, Jan 3, 2011 at 1:03 AM, Atul Prajapati <ap...@asite.com>
wrote:
> Hi,
>
>
>
> we are calling updateDocument(term, document) method on IndexWriter 
> and after that we are calling close() method of indexWriter.
>
>
>
> In Close() method i got the following IO exception.
>
>
>
> \\server01\files\luceneIndex\_c.cfs (The process cannot access the 
> file because it is being used by another process)
>
>
>
> Ni this case index writer was created successfully and it acquired 
> lock for that directory and due to above exception the lock file was 
> not removed.
>
>
>
> Is there any chances that _c.cfs file is used by any other process 
> because index writer already acquires lock on that directory?
>
>
>
> Is there any way to handle such scenario ?
>
>
>
>
>
> Lucene Version : 3.0.2
>
> OS : Windows Server 2003 64 bit
>
>
>
>
>
> Thanks,
>
> Atul
>
>

---------------------------------------------------------------------
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: IOException in updateDocument(term, document) method of IndexWriter

Posted by Michael McCandless <lu...@mikemccandless.com>.
Can you post the full exception that you hit?

And maybe a standalone test case showing the problem?

Mike

On Mon, Jan 3, 2011 at 1:03 AM, Atul Prajapati <ap...@asite.com> wrote:
> Hi,
>
>
>
> we are calling updateDocument(term, document) method on IndexWriter and
> after that we are calling close() method of indexWriter.
>
>
>
> In Close() method i got the following IO exception.
>
>
>
> \\server01\files\luceneIndex\_c.cfs (The process cannot access the file
> because it is being used by another process)
>
>
>
> Ni this case index writer was created successfully and it acquired lock
> for that directory and due to above exception the lock file was not
> removed.
>
>
>
> Is there any chances that _c.cfs file is used by any other process
> because index writer already acquires lock on that directory?
>
>
>
> Is there any way to handle such scenario ?
>
>
>
>
>
> Lucene Version : 3.0.2
>
> OS : Windows Server 2003 64 bit
>
>
>
>
>
> Thanks,
>
> Atul
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Search Score percentage, Should not be relative to the highest score

Posted by Amr ElAdawy <Am...@etisalat.com>.
Dear All,

                When using lucene to search documents, the results have a score based on their relativity to the search term. Inside lucene, the score
percentage is calculated as a percentage of the maximum score achieved.

Assume we are searching for Amr ElAdawy

We get results like the following along with the score:
Omar ElAdawy --> 1.6
Amro ElAdawy --> 1.9
Amir Adawi --> 1.3


With no exact match. Then the percentage will be calculated relative to the highest score ( despite the fact that it is not exact match). So the percentage will be:

Omar ElAdawy --> 84.21%
Amro ElAdawy --> 100%
Amir Adawi --> 68.42%


I need to change that, so the percentage will be relative to the exact match score. And will be something like that (assuming the Matching result score is 3):

Omar ElAdawy --> 53.33%
Amro ElAdawy --> 63.33%
Amir Adawi --> 43.33%


Regards,
Amr ElAdawy




The content of this email together with any attachments, statements and opinions expressed herein contains information that is private and confidential, are intended for the named addressee/s only. If you are not the addressee of this email you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. If you have received this message in error, please notify Mail.Admin@etisalat.com by email immediately and delete the message without making any copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org