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 vasu shah <va...@yahoo.com> on 2006/07/23 23:44:14 UTC

How reliable is lucene indexing !!

Hello Everyone,

We have an application and the current search is taking lot of time to return the results. We are doing a search against 8-9 database tables and 1.5 million records.

I want to increase the search speed and thinking of implementing lucene search. I went through the documentation and lucene seems promising for my application.

I have few doubts and would like to have some more insight on following points.

1. The application has around 150 users and they create all together 4000 inserts/updates in one day. I think of creating an index for 1.5 million records initially and then allow the inserts/updates to the index. The index size will approximately increase by 4000 records per day. 
Is lucene good for the application? Is it suitable for frequent inserts/updates?

2. The index has to be in sync with the database. Whenever  the user inserts/updates a record in the database, the index also needs to be updated accordingly. How do I handle the situation in where some process created write.lock/commit.lock and something went wrong and the lock files are still there. What would be the best practice/approach to handle this scenario?

Any help on this would be highly appreciated.

Thanks,
-Vasu

 		
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.

Re: How reliable is lucene indexing !!

Posted by vasu shah <va...@yahoo.com>.
Thank you very much for the quick response. I was just a little skeptical about Lucene for my application.
   
  This user forum is really supportive by posting the replies immediately.
   
  Thanks,
  -Vasu

karl wettin <ka...@gmail.com> wrote:
  On Sun, 2006-07-23 at 14:44 -0700, vasu shah wrote:

> I have few doubts 

> The index size will approximately increase by 4000 records per
> day. Is lucene good for the application?

Sure.

> Is it suitable for frequent inserts/updates?

Sure, but I don't consider 4000 new documents per day to be frequent.

> 2. The index has to be in sync with the database. Whenever the user
> inserts/updates a record in the database, the index also needs to be
> updated accordingly. 

> What would be the best practice/approach to handle this scenario?

Create an IndexWriter or Reader at commit-time and do the same changes
you did to the database. In case of update remove the index document and
create it again. 

> How do I handle the situation in where some process created 
> write.lock/commit.lock and something went wrong and the lock files are
> still there. 

You probably get locks due to bad use of readers and writers. Without
looking at the code you will only get abstract hints, so show us the
essence of what you are doing.


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



 			
---------------------------------
See the all-new, redesigned Yahoo.com.  Check it out.

Re: How reliable is lucene indexing !!

Posted by karl wettin <ka...@gmail.com>.
On Sun, 2006-07-23 at 14:44 -0700, vasu shah wrote:

> I have few doubts 

> The index size will approximately increase by 4000 records per
> day. Is lucene good for the application?

Sure.

>  Is it suitable for frequent inserts/updates?

Sure, but I don't consider 4000 new documents per day to be frequent.

> 2. The index has to be in sync with the database. Whenever the user
> inserts/updates a record in the database, the index also needs to be
> updated accordingly. 

> What would be the best practice/approach to handle this scenario?

Create an IndexWriter or Reader at commit-time and do the same changes
you did to the database. In case of update remove the index document and
create it again. 

> How do I handle the situation in where some process created 
> write.lock/commit.lock and something went wrong and the lock files are
> still there. 

You probably get locks due to bad use of readers and writers. Without
looking at the code you will only get abstract hints, so show us the
essence of what you are doing.


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