Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC2D99F01 for ; Mon, 12 Dec 2011 03:39:12 +0000 (UTC) Received: (qmail 51385 invoked by uid 500); 12 Dec 2011 03:39:11 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 51296 invoked by uid 500); 12 Dec 2011 03:39:08 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 50489 invoked by uid 99); 12 Dec 2011 03:39:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Dec 2011 03:39:03 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Dec 2011 03:38:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 61E1E95289 for ; Mon, 12 Dec 2011 03:38:31 +0000 (UTC) Date: Mon, 12 Dec 2011 03:38:31 +0000 (UTC) From: "peter chang (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <601122032.273.1323661111414.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1540554583.62690.1323617080134.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3638) IndexReader.document always return a doc with all the stored fields loaded. And this can be slow for the indexed document contain huge fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167334#comment-13167334 ] peter chang commented on LUCENE-3638: ------------------------------------- i upload this patch just for convenience {code:title=IndexSearcher.java|borderStyle=solid} /* Sugar for .getIndexReader().document(docID) */ /** see {@link IndexReader#document(int, Set, Set)} for detail*/ public Document doc(int docID, Set fieldsToAdd, Set fieldsToFilter) throws CorruptIndexException, IOException { return reader.document(docID, fieldsToAdd, fieldsToFilter); } {code} here, you see the IS also has the access to document fetch. so in this case, IS will look like powerless if IR can not supply such method or interface to the external. > IndexReader.document always return a doc with all the stored fields loaded. And this can be slow for the indexed document contain huge fields > --------------------------------------------------------------------------------------------------------------------------------------------- > > Key: LUCENE-3638 > URL: https://issues.apache.org/jira/browse/LUCENE-3638 > Project: Lucene - Java > Issue Type: Improvement > Components: core/index, core/search > Affects Versions: 4.0 > Environment: 64bit linux java 1.6 > Reporter: peter chang > Priority: Minor > Labels: patch > Fix For: 4.0 > > Attachments: doc.fields.patch > > > when generating digest for some documents with huge fields, it should be unnecessary to load the field but just interesting part of the field with the offset information. but indexreader always return the whole field content. afterward, the customized storedfieldsreader will got a repeated loading -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org