dcsimg
How to add document using Term
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   parag_dharmadhikari
Posted On:   Tuesday, April 2, 2002 01:05 AM

If I want to delete then I have to use method as
"IndexReader.delete(Term)".

But my question is before deleting the index I have to add the document to
the index and then I will delete the index.
but can please anybody will show me the way how to add the document using
Term(I have saw the APIs but still not clear about it).



regards
Parag

Re: How to add document using Term

Posted By:   Otis_Gospodnetic  
Posted On:   Tuesday, April 2, 2002 08:14 PM

An index consists of 1 or more documents, and a document consists of 1 or more fields.


Document and Field are Lucene classes, as is IndexWriter.
The only way to add something to the index is to create a document, add 1 or more fields to it, and then add the resulting document to the index using IndexWriter's addDocument method.
About | Sitemap | Contact