Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do I sometimes get a FileNotFoundException when I search and update my index at the same time?

0
Posted

Why do I sometimes get a FileNotFoundException when I search and update my index at the same time?

0

This typically happens when people do one or more of the following things: • Disable the locking on one or more of the processes searching or updating the index. • Configure a different lockDir for at least one of the processes searching or updating the index. • Try to search or update an index with the lockDir configured to be on an NFS (or Samba) mounted filesystem. Even though index searching is a read only operation, the IndexSearcher must momentarily lock the index when it is opened in order to get the list of files in the index. If locking is not configured properly it gets an incorrect list (because the list of files changes as the IndexWriter adds docs or optimizes the index). Remote filesystems (like NFS and Samba) rarely work, because they cannot make the transactional guarantees neccessary to ensure that all clients get consistent views of the directory.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123