Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 74427 invoked from network); 17 Nov 2009 10:17:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Nov 2009 10:17:02 -0000 Received: (qmail 59660 invoked by uid 500); 17 Nov 2009 10:17:02 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 59589 invoked by uid 500); 17 Nov 2009 10:17:01 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 59579 invoked by uid 99); 17 Nov 2009 10:17:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 10:17:01 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 10:16:59 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ABE7B234C1EF for ; Tue, 17 Nov 2009 02:16:39 -0800 (PST) Message-ID: <565312300.1258452999702.JavaMail.jira@brutus> Date: Tue, 17 Nov 2009 10:16:39 +0000 (UTC) From: "Noble Paul (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Updated: (SOLR-1516) DocumentList and Document QueryResponseWriter In-Reply-To: <1904121855.1255917271326.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Noble Paul updated SOLR-1516: ----------------------------- Attachment: SOLR-1516.patch idea as a patch (untested) > DocumentList and Document QueryResponseWriter > --------------------------------------------- > > Key: SOLR-1516 > URL: https://issues.apache.org/jira/browse/SOLR-1516 > Project: Solr > Issue Type: New Feature > Components: search > Affects Versions: 1.3 > Environment: My MacBook Pro laptop. > Reporter: Chris A. Mattmann > Assignee: Noble Paul > Priority: Minor > Fix For: 1.5 > > Attachments: SOLR-1516.Mattmann.101809.patch.txt, SOLR-1516.patch > > > I tried to implement a custom QueryResponseWriter the other day and was amazed at the level of unmarshalling and weeding through objects that was necessary just to format the output o.a.l.Document list. As a user, I wanted to be able to implement either 2 functions: > * process a document at a time, and format it (for speed/efficiency) > * process all the documents at once, and format them (in case an aggregate calculation is necessary for outputting) > So, I've decided to contribute 2 simple classes that I think are sufficiently generic and reusable. The first is o.a.s.request.DocumentResponseWriter -- it handles the first bullet above. The second is o.a.s.request.DocumentListResponseWriter. Both are abstract base classes and require the user to implement either an #emitDoc function (in the case of bullet 1), or an #emitDocList function (in the case of bullet 2). Both classes provide an #emitHeader and #emitFooter function set that handles formatting and output before the Document list is processed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.