lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitasha Walia (niwalia)" <niwa...@cisco.com>
Subject RE: Appending to index
Date Mon, 07 Apr 2008 22:37:05 GMT
Hi, 

I am sorry, I don't quite understand what you meant by.. 

IndexWriter.updateDocument(...)

HTH

Let me re-phrase my question:

I need to append to an existing index. Presently, the code is structured
to check for the existing file, and exit if the file exists:

if(INDEX_FILE.exists())
{
System.out.println("Index File exists, remove existing index and
retry");
System.exit(1);
}

IndexWriter write = new IndexWriter(INDEX_FILE, new StandardAnalyser(),
true);
indexDocs(writer, FILE_TO_BE_INDEXED);
writer.optimize()
writer.close();

What files do I need to modify ? And what functions? Can you please
advise. 

Thanks,
Nitasha


-----Original Message-----
From: Michael Wechner [mailto:michael.wechner@wyona.com] 
Sent: Monday, April 07, 2008 1:11 PM
To: java-user@lucene.apache.org
Subject: Re: Appending to index

Nitasha Walia (niwalia) wrote:

>Hi,
> 
>I am a new user of Java Lucene. The default index is such that a new 
>files is created every time, which requires me to delete the existing 
>index folder.
> 
>I want to append to the existing index. Can someone please guide me on 
>how to do the same?
>  
>

IndexWriter.updateDocument(...)

HTH

Michael

> 
>Thanks,
>Nitasha Walia
>Software Engineer, Cisco Systems
>
>  
>


--
Michael Wechner
Wyona      -   Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner@wyona.com, michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message