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 umamahesh bayireddya <um...@hotmail.com> on 2004/01/30 02:02:33 UTC

can i remove commit.lock while sreaching in my application

hi all

I am using lucene in my web application.
I am using 2 index directories.  For the first time I will create index in 
index1 directory and next time I will create in index2. I will use flip-flop 
mechanism in two directories.
After creating index all the users who are searching will point to new index 
directory(this I will handle using flags).

So I won’t have searching and adding/deleting documents simultaneously to 
one index directory.

Now can I remove commit.lock file when I am search documents.
As I have a problem like in peak traffic searching is timing out in 
obtaining  commit.lock this is rare but I have to eliminate.

As I understood commit.lock is there not to write anything into index 
directory when someone is search, am I right?
Please let me know if it is wrong assumption

So I am thinking of remove commit.lock when searching for document as multi 
read is allowed on any operating system
If not please suggest me alternative

I am creating IndexSearch object whenever there is a request for searching. 
I will be creating index everyday after adding and removing file to source 
directory where my file reside.

Please give ur suggestion, alternative

Thanking you
mahesh

_________________________________________________________________
Contact brides & grooms FREE! http://www.shaadi.com/ptnr.php?ptnr=hmltag 
Only on www.shaadi.com. Register now!


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


Re: can i remove commit.lock while sreaching in my application

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Lucene doesn't keep any of its locks for longer than it has to.
Therefore, whenever you choose to forcefully remove a lock while Lucene
is running, you are very likely to be making a bad decision.

Please use lucene-user list, don't email directly nor spam the list,
and always try to keep this in mind:
http://www.raibledesigns.com/repository/images/bartgoogle.gif :)

Otis



--- umamahesh bayireddya <um...@hotmail.com> wrote:
> hi all
> 
> I am using lucene in my web application.
> I am using 2 index directories.  For the first time I will create
> index in 
> index1 directory and next time I will create in index2. I will use
> flip-flop 
> mechanism in two directories.
> After creating index all the users who are searching will point to
> new index 
> directory(this I will handle using flags).
> 
> So I won�t have searching and adding/deleting documents
> simultaneously to 
> one index directory.
> 
> Now can I remove commit.lock file when I am search documents.
> As I have a problem like in peak traffic searching is timing out in 
> obtaining  commit.lock this is rare but I have to eliminate.
> 
> As I understood commit.lock is there not to write anything into index
> 
> directory when someone is search, am I right?
> Please let me know if it is wrong assumption
> 
> So I am thinking of remove commit.lock when searching for document as
> multi 
> read is allowed on any operating system
> If not please suggest me alternative
> 
> I am creating IndexSearch object whenever there is a request for
> searching. 
> I will be creating index everyday after adding and removing file to
> source 
> directory where my file reside.
> 
> Please give ur suggestion, alternative
> 
> Thanking you
> mahesh
> 
> _________________________________________________________________
> Contact brides & grooms FREE!
> http://www.shaadi.com/ptnr.php?ptnr=hmltag 
> Only on www.shaadi.com. Register now!
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


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