Now it looks like you are creating the IndexWriter with create=false when in fact there is no existing index in that directory.
Mike <[EMAIL PROTECTED]> wrote: > I got this error after dleteing that file > > Exception in thread "main" java.io.FileNotFoundException: > C:\pIndexed\segments (The system cannot find the file specified) > at java.io.RandomAccessFile.open(Native Method) > at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212) > at org.apache.lucene.store.FSInputStream$Descriptor.<init>( > FSDirectory.java:376) > at org.apache.lucene.store.FSInputStream.<init>(FSDirectory.java > :405) > at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java > :268) > at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:40) > at org.apache.lucene.index.IndexWriter$1.doBody(IndexWriter.java > :233) > at org.apache.lucene.store.Lock$With.run(Lock.java:109) > at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:228) > > at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:193) > > at com.cecilia.wim.process.Indexer.index(Indexer.java:29) > at com.cecilia.wim.process.Indexer.main(Indexer.java:68) > > > > On Thu, Jan 31, 2008 at 2:49 PM, Michael McCandless < > [EMAIL PROTECTED]> wrote: > > > > > It looks like you are passing "true" to FSDirectory.getDirectory, > > which you shouldn't do. Always pass "false" to that. (Newer > > versions of Lucene have deprecated the create flag to FSDirectory, > > leaving it entirely to IndexWriter). > > > > On the lock obtain timed out, probably that's a left over lock file, > > so you should just remove it if you're sure it is. > > > > Mike > > > > anjana m wrote: > > > > > with true: > > > i finding a serious problem when i need new index please help.. > > > but how can ikeep chnaging the true flase option.. > > > :( > > > please help me...:( > > > Exception in thread "main" java.io.IOException: Cannot delete _17.cfs > > > at org.apache.lucene.store.FSDirectory.create > > > (FSDirectory.java:144) > > > at org.apache.lucene.store.FSDirectory.<init> > > > (FSDirectory.java:128) > > > at org.apache.lucene.store.FSDirectory.getDirectory > > > (FSDirectory.java > > > :102) > > > at org.apache.lucene.index.IndexWriter.<init> > > > (IndexWriter.java:193) > > > > > > > > > False > > > Exception in thread "main" java.io.IOException: Lock obtain timed out: > > > [EMAIL PROTECTED]:\DOCUME~1\ANJANA\LOCALS~1\Temp\lucene- > > > 3ca21f86af4e6d9f86b82f8f13be98e4-write.lock > > > at org.apache.lucene.store.Lock.obtain(Lock.java:58) > > > at org.apache.lucene.index.IndexWriter.<init> > > > (IndexWriter.java:223) > > > at org.apache.lucene.index.IndexWriter.<init> > > > (IndexWriter.java:193) > > > at com.cecilia.wim.process.Indexer.index(Indexer.java:25) > > > at com.cecilia.wim.process.Indexer.main(Indexer.java:60) > > > > > > > > > On Jan 28, 2008 3:22 AM, Erick Erickson <[EMAIL PROTECTED]> > > > wrote: > > > > > >> Set the parameter to false as per the documentation.... > > >> > > >> Erick > > >> > > >> On Jan 27, 2008 5:11 AM, anjana m <[EMAIL PROTECTED]> wrote: > > >> > > >>> yes i dont want the old index to be deletd since its running on > > >>> my app > > >>> server.. > > >>> any suggestion..? > > >>> > > >>> On Jan 27, 2008 3:07 PM, Daniel Naber > > >>> <[EMAIL PROTECTED]> > > >>> wrote: > > >>> > > >>>> On Sonntag, 27. Januar 2008, anjana m wrote: > > >>>> > > >>>>> IndexWriter writer = new IndexWriter(indexDir, new > > >>>>> StandardAnalyzer(), true); > > >>>> > > >>>> The true parameter means that the old index will be deleted, is > > >>>> that > > >>> your > > >>>> problem? > > >>>> > > >>>> Regards > > >>>> Daniel > > >>>> > > >>>> -- > > >>>> http://www.danielnaber.de > > >>>> > > >>>> ------------------------------------------------------------------- > > >>>> -- > > >>>> 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]