Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 33095 invoked from network); 3 Feb 2007 18:17:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Feb 2007 18:17:33 -0000 Received: (qmail 68510 invoked by uid 500); 3 Feb 2007 18:17:33 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 68462 invoked by uid 500); 3 Feb 2007 18:17:33 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 68444 invoked by uid 99); 3 Feb 2007 18:17:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Feb 2007 10:17:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Feb 2007 10:17:26 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 698D47142E2 for ; Sat, 3 Feb 2007 10:17:06 -0800 (PST) Message-ID: <30038550.1170526626429.JavaMail.jira@brutus> Date: Sat, 3 Feb 2007 10:17:06 -0800 (PST) From: "Karl Wettin (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-550) InstantiatedIndex - faster but memory consuming index In-Reply-To: <33188999.1145512002000.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karl Wettin updated LUCENE-550: ------------------------------- Attachment: trunk.diff.bz2 Added support for contrib/memory MemoryIndex, so now it works with readers and writers as if it was any other index. Added a consumer level index implementation that handles cache, notifications, and all the stuff this issue is about: // This is the instace one is supposed to use for all access against the index in this JVM. IndexFacade index = new IndexFacade(new RAMDirectoryIndex()); // Accessors IndexWriterInterface writer = index.indexWriterFactory(anayzler, true); Document doc = new Document(); doc.add(... writer.add(doc); writer.close(); IndexReader deleter = index.indexReaderFactory(); index.getSearcher().search(... index.getReader().doc(0) deleter.close(); assertEquals(0, index.getReader().numDocs()); public class IndexFacade { /** wrapps any storage, optional cache settings */ public IndexFacade(I index, CachedSearcher.HitCollectionCacheState hitCollectionCache, boolean topDocsCache, boolean topFieldsCache, boolean documentsCache) throws IOException { public CachedSearcher getSearcher() throws IOException { /** The general consumer searcher to be used when querying this index. Always fresh. */ public Searcher getSearcher() throws IOException { /** The general consumer read only index reader to be used when inspecting this index. Always fresh. */ public IndexReader getReader() throws IOException { > InstantiatedIndex - faster but memory consuming index > ----------------------------------------------------- > > Key: LUCENE-550 > URL: https://issues.apache.org/jira/browse/LUCENE-550 > Project: Lucene - Java > Issue Type: New Feature > Components: Store > Affects Versions: 2.0.0 > Reporter: Karl Wettin > Assigned To: Karl Wettin > Attachments: lucene-550.jpg, test-reports.zip, trunk.diff.bz2, trunk.diff.bz2 > > > An non file centrinc all in memory index. Consumes some 2x the memory of a RAMDirectory (in a term satured index) but is between 3x-60x faster depending on application and how one counts. Average query is about 8x faster. IndexWriter and IndexModifier have been realized in InterfaceIndexWriter and InterfaceIndexModifier. > InstantiatedIndex is wrapped in a new top layer index facade (class Index) that comes with factory methods for writers, readers and searchers for unison index handeling. There are decorators with notification handling that can be used for automatically syncronizing searchers on updates, et.c. > Index also comes with FS/RAMDirectory implementation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org