Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 68235 invoked from network); 30 May 2002 21:55:36 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 30 May 2002 21:55:36 -0000 Received: (qmail 8242 invoked by uid 97); 30 May 2002 21:55:39 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 8180 invoked by uid 97); 30 May 2002 21:55:37 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 8168 invoked by uid 98); 30 May 2002 21:55:36 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) X-Originating-IP: [152.163.190.1] From: "Hyong Ko" To: lucene-user@jakarta.apache.org Bcc: Subject: Re: segment count Date: Thu, 30 May 2002 21:55:33 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 30 May 2002 21:55:34.0003 (UTC) FILETIME=[B9464430:01C20824] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thank you very much for your prompt response. In order to make a search, the mergeSegments() function must be called right? Otherwise IndexSearcher won't have the most updated index files to work with to do a search. I guess my point is that do I have to intermittenly call Optimize or Close (to call mergeSegments()) or make maybeMergeSegments to find a merge to do before using IndexSearcher? Btw, I am running IndexFiles and SearchFiles at the same time. Also, when IndexWriter.addDocument is called per file, the function calls newSegmentName() to create its corresponding segement name. That segment name is used to create a SegmentInfo, which gets added to the SegmentInfos vector. Am I missing something? Thanks!! >From: Ian Lea >Reply-To: "Lucene Users List" >To: Hyong Ko >CC: lucene-user@jakarta.apache.org >Subject: Re: segment count >Date: Thu, 30 May 2002 22:07:29 +0100 (BST) > >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/ > >-- >To unsubscribe, e-mail: > >For additional commands, e-mail: > _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: For additional commands, e-mail: