How to retrieve number of documents based on a query ?

2008-06-25 Thread java_is_everything
Hi all. Is there a way to obtain the number of documents in the Lucene index (2.0.0), having a particular term indexed, much like what we do in a database ? Looking forward to a reply. Ajay Garg -- View this message in context: http://www.nabble.com/How-to-retrieve-number-of-documents-based-o

Can we know "number-of-documents-that-will-be-flushed"?

2008-06-26 Thread java_is_everything
Hi all. Is there a way to know "number-of-documents-that-will-be-flushed", just before giving a call to flush() method? I am currently using Lucene 2.2.0 API. Looking forward to replies. Ajay Garg -- View this message in context: http://www.nabble.com/Can-we-know-%22number-of-documents-that-w

Re: Can we know "number-of-documents-that-will-be-flushed"?

2008-06-27 Thread java_is_everything
Hi Mike. Thanks for the reply. Just one doubt. Will it work if the indexwriter directory is "not" a RAMDirectory? Looking forward to a reply. Ajay Garg Michael McCandless-2 wrote: > > IndexWriter.numRamDocs() should give you that. > > Mike > > java_is_everythi

Doubt on IndexWriter.close()

2008-06-27 Thread java_is_everything
Hi all. IndexWriter.close() API states that :: "Flushes all changes to an index and closes all associated files.". What does "closes all associated files" mean, since we are apparently able to still addDocument() even after calling IndexWriter.close() ? Looking forward to a reply. Ajay garg

Re: Doubt on IndexWriter.close()

2008-06-29 Thread java_is_everything
> > Mike > > java_is_everything <[EMAIL PROTECTED]> wrote: >> >> Hi all. >> >> IndexWriter.close() API states that :: >> >> "Flushes all changes to an index and closes all associated files.". >> >> What does "closes all associated

Query in IndexWriter.deleteDocuments(Term term)

2008-07-25 Thread java_is_everything
Hi all. This may seem a longish and informal mail, but do correct me if my assumptions are wrong anywhere, otherwise my actual doubt will make no sense. Say I opened an IndexWriter on an initially empty directory, using autocommit = true. Now, what I do is add and delete documents randomly. I se