Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 53576 invoked from network); 15 Jul 2010 03:17:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jul 2010 03:17:56 -0000 Received: (qmail 90407 invoked by uid 500); 15 Jul 2010 03:17:54 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 89967 invoked by uid 500); 15 Jul 2010 03:17:50 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 89957 invoked by uid 99); 15 Jul 2010 03:17:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 03:17:49 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fancyerii@gmail.com designates 74.125.83.176 as permitted sender) Received: from [74.125.83.176] (HELO mail-pv0-f176.google.com) (74.125.83.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 03:17:41 +0000 Received: by pvc21 with SMTP id 21so218286pvc.35 for ; Wed, 14 Jul 2010 20:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=M+3tOr4QUPGBVs5gI6wNvw1BkQwuOJNpghllYBm8X/A=; b=lAqfv90vOIjRjTXpLm4tYC+yEMB1L71A9oYJ/jmvJj8TzrhcumQC9REGAQJvn322wv 4bgQ2b/3OSt9mdcLvaqT+JwS25Xv6tpy8UjjO/zcfKis6L04Fo9Ct3J2RV1iBGVvX/4P JWy0AoO5f86dY/0G2XYmM5jtMQ1WdwGxE5DdE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=rXhSFrWd0rkB0wtPQYkHO5gZrajaaz8qOXnlHhihs4PvAL4Bc/mo+Mo4eIf6JngPsf spZyL7kSWcOQoBhviGkZoJrTthc05KrJbicPPyBr0bwbvylW6Lf3dHwIYyulD67kEoSh xF5YDVyf7Hh3VMaRa6P3pg9VMpmU2EtFQP74w= MIME-Version: 1.0 Received: by 10.142.234.11 with SMTP id g11mr23333418wfh.202.1279163780108; Wed, 14 Jul 2010 20:16:20 -0700 (PDT) Received: by 10.142.188.17 with HTTP; Wed, 14 Jul 2010 20:16:20 -0700 (PDT) Date: Thu, 15 Jul 2010 11:16:20 +0800 Message-ID: Subject: about warm up From: Li Li To: solr-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I want to load full text into an external cache, So I added so codes in newSearcher where I found the warm up takes place. I add my codes before solr warm up which is configed in solrconfig.xml like this: ... public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher) { warmTextCache(newSearcher,warmTextCache,new String[]{"title","content"}); for (NamedList nlst : (List)args.get("queries")) { } } in warmTextCache I need a reader to get some docs for(int i=0;i0 && !forceNew && _searcher==null) { try { Line 1000 searcherLock.wait(); } catch (InterruptedException e) { log.info(SolrException.toStr(e)); } } And about 5 minutes later. it's ok. So How can I get a "safe" reader in this situation?