Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 18390 invoked from network); 27 Oct 2006 12:49:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Oct 2006 12:49:04 -0000 Received: (qmail 29056 invoked by uid 500); 27 Oct 2006 12:49:09 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 29033 invoked by uid 500); 27 Oct 2006 12:49:08 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 29022 invoked by uid 99); 27 Oct 2006 12:49:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Oct 2006 05:49:08 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of erickerickson@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Oct 2006 05:48:54 -0700 Received: by nf-out-0910.google.com with SMTP id b2so306286nfe for ; Fri, 27 Oct 2006 05:48:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=fl+TkGPiuyHtfk/Qg+UQbwmCNdBHnvWNCESooaMnghyWN7csgAV8Uc7lJ9+xOEzIkCfCkB/SFh1c7YgCjPZTBSm2QiEhGAfLABTBLpU9o6r9hgXGEXHFRDP23HGQp9mq5Bcufrdjafj1VU7OeR5WiF4Ot/Bj64bgx4A/yk5LvMQ= Received: by 10.82.129.8 with SMTP id b8mr1334231bud; Fri, 27 Oct 2006 05:48:33 -0700 (PDT) Received: by 10.82.162.13 with HTTP; Fri, 27 Oct 2006 05:48:32 -0700 (PDT) Message-ID: <359a92830610270548l58950490g6028362175a729fd@mail.gmail.com> Date: Fri, 27 Oct 2006 08:48:32 -0400 From: "Erick Erickson" To: java-user@lucene.apache.org Subject: Re: Search Problem In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_41228_3029840.1161953312974" References: <359a92830610260903q561e8d50qaa9a3dbae02c580b@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_41228_3029840.1161953312974 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm not all that familiar with the remotesearcher stuff. But somewhere you must open an indexreader. So wherever that code is, just close the index reader (and anything that uses it, like Serachables(?)) and re-open it. That should pick up your recent changes. Of course, now would be a fine time for someone who actually understands the remote/parallel architecture to chime in ... Erick In the server code, all you have to do something like On 10/27/06, Sunil Kumar PK wrote: > > Thanks Erick for the information. > > Actually I am using RemoteParallelMultiSearcher with 10 Search Servers, my > crawler program freequently add new documents in to all the Search Servers > in a distributed manner. So in this case, if I add a document in a > particular index, I need to restart the searcher program in that server. > right? Can I do this with a remote call, or I want to add a new method to > Searchable interface? > > Thanks, > Sunil > > On 10/26/06, Erick Erickson wrote: > > > > Yes, but you must close and re-open your SEARCHER. There are various > > schemes > > for doing this based upon now expensive it is to open a new searcher and > > how > > often you need to do it, but it's not built into Lucene AFAIK. It all > > depends upon how quickly you have to see the results of your update. > > > > Also, be aware that your update code does not necessarily write your > data > > to > > the index immediately, so you can only be assured that the data is > > available > > if you, say, close your index updater. > > > > Erick > > > > On 10/26/06, Sunil Kumar PK wrote: > > > > > > Hi, > > > > > > I have a program to create a lucene index, and another program for > > > searching > > > that index. > > > > > > The Search program create an IndexSearcher object once in its > > constructor, > > > and I created a method doSearch to search the index. The doSearch > method > > > uses the indexSearcher object to get the Hits. > > > > > > My Indexer program is continuously adding documents to the index. > > > > > > My problem is that I am not getting the matching documents in my > search > > > results, which are added after creating the IndexSearcher object in my > > > Search program. > > > Is it possible to get all the matching document in the result without > > > restarting the Searcher program? > > > > > > Thanks, > > > Sunil > > > > > > > > > > > > ------=_Part_41228_3029840.1161953312974--