lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "WATHELET Thomas" <>
Subject RE: FileNotFoundException
Date Tue, 01 Aug 2006 12:32:47 GMT
For the index process I use IndexModifier class.
That happens when I try to search something into the index in the same
time that the index process still running. 

the code for indexing:
	  System.setProperty("org.apache.lucene.lockDir", System
        File folder = new File(getIndexPath());
        Directory dir = null;
        if (folder.isDirectory() && folder.exists()) {
            dir = FSDirectory.getDirectory(getIndexPath(), false);
        } else if (!folder.isFile() && !folder.exists()) {
            dir = FSDirectory.getDirectory(getIndexPath(), true);
        } else {
            System.out.println("Bad index folder");
        boolean newIndex = true;
        if (dir.fileExists("segments")) {
            newIndex = false;
        // long lastindexation = dir.fileModified("segments");
        writer = new IndexModifier(dir, new SimpleAnalyzer(), newIndex);

Code For searching:

	  MultiSearcher multisearch = new MultiSearcher(indexsearcher);
	  Hits hits =;

-----Original Message-----
From: Michael McCandless [] 
Sent: 01 August 2006 13:45
Subject: Re: FileNotFoundException

> When the indexing process still running on a index and I try to search
> something on this index I retrive this error message:
> \\tradluxstmp01\JavaIndex\tra\index_EN\_2hea.fnm (The system cannot
> the file specified)
> How can I solve this.

Could you provide some more context about your application or a small 
test case that shows the error happening?  This sounds likely to be a 
locking issue.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message