Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 23816 invoked from network); 16 Nov 2008 16:47:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Nov 2008 16:47:08 -0000 Received: (qmail 48681 invoked by uid 500); 16 Nov 2008 16:47:08 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 48646 invoked by uid 500); 16 Nov 2008 16:47: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 48635 invoked by uid 99); 16 Nov 2008 16:47:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Nov 2008 08:47:08 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of markrmiller@gmail.com designates 64.233.170.187 as permitted sender) Received: from [64.233.170.187] (HELO rn-out-0910.google.com) (64.233.170.187) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Nov 2008 16:45:46 +0000 Received: by rn-out-0910.google.com with SMTP id j71so1752227rne.4 for ; Sun, 16 Nov 2008 08:46:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=dXXgqGrs2Jfz8pgeO4vAOjsuXIvk7sY3oXgi+f7LnV4=; b=kWK4RHEaPAUAIVZcQ6N4yTSYmtSii0uh8OeTnq5j1nPcVmYinVpS/Euxt7S/zL/p1N MIfZ6YSvfWYas+70ljIi4nmO7VqGjmPP6RhVRbLHjli7YDHnhnZnVrHgPTr0SsqAl3Eo zbA+5vLsy9oqMeeg5hQsa4fe6l7rjFq3elIJM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=S3VEQrF9o0hUP4xEjA/q1SFblr2yQOnrkpuUGnDHKEUgl0QpqPyVJr8ia1L/rtxKM5 Ygubs6XlaI+tv+FRzyvR0R/pdip5cdp5He/R6SVoPKjBKDIDiCvyMQHSzCJKauBneWKH qo1aF9B2M3ivVQrIyHpcxnSb/+LWP7jOna2RI= Received: by 10.90.65.5 with SMTP id n5mr2135972aga.14.1226853980544; Sun, 16 Nov 2008 08:46:20 -0800 (PST) Received: from ?192.168.1.100? (ool-44c639d9.dyn.optonline.net [68.198.57.217]) by mx.google.com with ESMTPS id 20sm2233049agb.38.2008.11.16.08.46.19 (version=SSLv3 cipher=RC4-MD5); Sun, 16 Nov 2008 08:46:20 -0800 (PST) Message-ID: <49204E5D.6010101@gmail.com> Date: Sun, 16 Nov 2008 11:46:21 -0500 From: Mark Miller User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: InstantiatedIndex help References: <1226849983.12418.8.camel@nuraku> <4920414F.5000601@gmail.com> <1226851411.12418.15.camel@nuraku> In-Reply-To: <1226851411.12418.15.camel@nuraku> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Can you start with an empty index? Then how about: // Adding these iindex = InstantiatedIndex() ireader = iindex.indexReaderFactory() isearcher = IndexSearcher(ireader) If you want a copy from another IndexReader though, you have to get that reader from somewhere right? - Mark Darren Govoni wrote: > Hi Mark, > Thanks for the tips. Here's what I will try (psuedo-code) > > endirectory = RAMDirectory("index/dictionary.en") > ensearcher = IndexSearcher(endirectory) > // Adding these > reader = ensearcher.getIndexReader() > iindex = InstantiatedIndex(reader) > ireader = iindex.indexReaderFactory() > isearcher = IndexSearcher(ireader) > > Kind of round about way to get an InstantiatedIndex I guess,but maybe > there's a briefer way? > > Thank you. > Darren > > On Sun, 2008-11-16 at 10:50 -0500, Mark Miller wrote: > >> Check out the docs at: >> http://lucene.apache.org/java/2_4_0/api/contrib-instantiated/index.html >> >> There is a performance graph there to check out. >> >> The code should be fairly straightforward - you can make an >> InstantiatedIndex thats empty, or seed it with an IndexReader. Then you >> can make an InstantiatedReader or Writer, which take the >> InstantiatedIndex as a constructor arg. >> >> You should be able to just wrap that InstantiatedReader in a regular >> Searcher. >> >> Darren Govoni wrote: >> >>> Hi gang, >>> I am trying to trace the 2.4 API to create an InstantiatedIndex, but >>> its rather difficult to connect directory,reader,search,index etc just >>> reading the javadocs. >>> >>> I have a (POI - plain old index) directory already and want to >>> create a faster InstantiatedIndex and IndexSearcher to query it like >>> before. What's the proper order to do this? >>> >>> Also, if anyone has any empirical data on the performance or reliability >>> of InstantiatedIndex, I'd be curious. >>> >>> Thanks for the tips! >>> Darren >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: java-user-help@lucene.apache.org >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org