tags:

views:

287

answers:

4

I am working on a job portal site and have been using Lucene for job search functionality. Users will be posting a number jobs on our site on a daily basis.We need to make sure that new job posted is searchable on the site as soon as possible. In this context, how do I update Lucene index when a new job is posted or when an existing job is edited? Can lucene index updating and search work in parallel?

Also,can I know any tips/best practices with respect to Lucene indexing,optimizing,performance etc?

Appreciate ur help!

Thanks!

A: 

I have used Lucene.Net on a web site similar to what you are doing. Yes, you can do live indexes, updating to keep everything up to date? What platform are you using Lucene on, .NET, Java?

Craig
am using .net..any recommendations for indexing and optimization?Thanks
Ed
+3  A: 

Yes, Lucene can search from and write to an index at the same time as long as no more than 1 IndexWriter writes to it. If you want the new records visible ASAP, have the IndexWriter call the commit() function often (see IndexWriter's JavaDoc for details).

These Wiki pages might also help:

ImproveIndexingSpeed

ImproveSearchingSpeed

Kai Chan
A: 

thanks for your answer....an using .Net platform

Ed
A: 

Make sure you create a new IndexSearcher as any additions after an IndexSearcher has been created are not visible to that instance.

A better approach may be to ReOpen the IndexReader if you want to resuse the same index searcher.

Indywizard