On Mar 13, 2008, at 11:03 AM, John Wang wrote:
Yes, but usually it's a good idea to add documents in batch and not
having
to reinstantiate the writer for every document and then closing it.
Why does what I suggested require instantiating a new writer for every
document? It uses the analyzer you pass in w/ the method:
IndexWriter writer = new IndexWriter(dir, defaultAnalyzer,....)
while adding docs
Document doc = ...
Analyzer analyzer = getAnalyzer(language)
writer.addDocument(doc, analyzer)
writer.close()
-Grant
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]