Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Lucene : rebuilding the index

Thread view: 
Zouplaz - 19 Oct 2005 20:59 GMT
Hello, I'm new to Lucene and would to have your advice about index
rebuilding.

Whenever I try to recreate the index, I need to close the current
IndexReader (I use only one IndexReader instance for all that web
application). Without closing it first, I get messages like "unable to
delete 4.cfs file" and some others.

I've read the FAQ and the doc and nothing seems to prevent rebuiling an  
index without leaving a reader opened.

What's wrong ?

Thanks
Chris Smith - 19 Oct 2005 21:16 GMT
> Hello, I'm new to Lucene and would to have your advice about index
> rebuilding.
[quoted text clipped - 6 lines]
> I've read the FAQ and the doc and nothing seems to prevent rebuiling an  
> index without leaving a reader opened.

Most likely it's operating system dependent.  On UNIX, you should have
no problem deleting a file that's currently open.  On Windows, you will
have trouble.  This is an area where it's not really possible to provide
compatible behavior, so the Java API spec leaves it undefined, only
guaranteeing that delete() will return false if, in fact, the delete
operation fails.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

E.J. Pitt - 20 Oct 2005 10:13 GMT
> Hello, I'm new to Lucene and would to have your advice about index
> rebuilding.
[quoted text clipped - 3 lines]
> application). Without closing it first, I get messages like "unable to
> delete 4.cfs file" and some others.

There is a lucene mailing list and you should ask on that list, but from
memory (it's been two years) it is legal to rebuild a Lucene index while
someone else is reading (as long as they're not deleting), so you can
ignore the error. The file will get deleted later on.
Zouplaz - 23 Oct 2005 19:55 GMT
"E.J. Pitt" <esmond.not.pitt@not.bigpond.com> wrote in news:RdJ5f.23174
$U51.12946@news-server.bigpond.net.au:

>> Hello, I'm new to Lucene and would to have your advice about index
>> rebuilding.
[quoted text clipped - 8 lines]
> someone else is reading (as long as they're not deleting), so you can
> ignore the error. The file will get deleted later on.

Thank you... I'll will try !


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.