lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <...@digimem.net>
Subject Re: segment count
Date Thu, 30 May 2002 21:07:29 GMT
Lucene doesn't store one document per segment.  See
http://marc.theaimsgroup.com/?l=lucene-user&m=102079295608850&w=2
for detail on the files created.

On "is this the right way ..."?, here is an extract from the javadoc

   1. Create Document's by adding Field's.
   2. Create an IndexWriter and add documents to to it with addDocument();
   3. Call QueryParser.parse() to build a query from a string; and
   4. Create an IndexSearcher and pass the query to it's search() method.


--
Ian.
ian@digimem.net


> hyong_ko@hotmail.com (Hyong Ko) wrote 
>
> I added a segment using IndexWriter.addDocument. Then I called 
> IndexWriter.optimize (IndexWriter.close works too) to generate index files 
> to do a search. Then I added another segment using IndexWriter.addDocument. 
> The total segment count should be 2, but instead it's 3. Any ideas? Is this 
> the right way to index and search concurrently? Thanks.

----------------------------------------------------------------------
Searchable personal storage and archiving from http://www.digimem.net/


Mime
View raw message