I'm sure that it's the good location.
When the index process is finished then I can access the index.
I know why but I don't know how to solve it.
When I indexing a lot of file with the extension cfs are created and
after few second the file are merge in an other file
ex:
I have a file with this name _8df.cfs and after few second this file
disappeared (because it merged with an other file with a new name) so
the IndexSearcher can't find it.

-----Original Message-----
From: Erick Erickson [mailto:[EMAIL PROTECTED] 
Sent: 01 August 2006 15:49
To: java-user@lucene.apache.org
Subject: Re: FileNotFoundException

So it sounds like you're not writing the index to the place you think
you
are. Have you just looked in the directories and checked that there are
files there? If Luke can't find them, they're not where you think they
are.
Especially if your writer had closed before you looked.

Erick

On 8/1/06, WATHELET Thomas <[EMAIL PROTECTED]> wrote:
>
> It's the same when I try to open the index with luke
>
> -----Original Message-----
> From: Erick Erickson [mailto:[EMAIL PROTECTED]
> Sent: 01 August 2006 15:24
> To: java-user@lucene.apache.org
> Subject: Re: FileNotFoundException
>
> two things come to mind....
>
> 1> are you absolutely sure that your reader and writer are pointing to
> the
> same place? Really, absolutely, positively sure? You've hard-coded the
> path
> into both writer and reader just to be really, absolutely positively
> sure?
> Or, you could let the writer close and *then* try the reader to see if
> it's
> a timing issue or a path issue.
>
> 2> You say that the indexer is still open. Is there any chance it
hasn't
> yet
> written anything to disk? I'm not sure of the internals, but there has
> been
> some discussion that internally a writer uses a RAMdir for a while
then
> periodically flushes the results to disk. It's possible that you're
> writer
> hasn't written anything yet.....
>
> 3> (so I can't count). Have you used Luke to open your index to see if
> that
> works (and the file is in the place you expect)?
>
> FWIW
> Erick
>
> On 8/1/06, WATHELET Thomas <[EMAIL PROTECTED]> wrote:
> >
> > 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
> >                 .getProperty("user.dir"));
> >         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");
> >             System.exit(1);
> >         }
> >         boolean newIndex = true;
> >         if (dir.fileExists("segments")) {
> >             newIndex = false;
> >         }
> >         // long lastindexation = dir.fileModified("segments");
> >         writer = new IndexModifier(dir, new SimpleAnalyzer(),
> newIndex);
> >         dir.close();
> >         writer.setUseCompoundFile(true);
> >           ...
> >
> > Code For searching:
> >
> >           MultiSearcher multisearch = new
> MultiSearcher(indexsearcher);
> >           Hits hits = this.multisearch.search(this.getBoolQuery());
> >           ...
> >
> > -----Original Message-----
> > From: Michael McCandless [mailto:[EMAIL PROTECTED]
> > Sent: 01 August 2006 13:45
> > To: java-user@lucene.apache.org
> > 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:
> > > java.io.FileNotFoundException:
> > > \\tradluxstmp01\JavaIndex\tra\index_EN\_2hea.fnm (The system
cannot
> > find
> > > 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.
> >
> > Mike
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to