[
https://issues.apache.org/jira/browse/SOLR-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767925#action_12767925
]
Chris A. Mattmann commented on SOLR-1516:
-----------------------------------------
Hi All:
I don't mean to be a pest here, but I've seen the amount of activity going on
the SOLR lists recently, as well as the decision to hold off on calling for a
vote on 1.4 until Lucene 2.9.1 is released. This patch is self-contained,
doesn't touch any code, and honestly, it only adds functionality that would
have made my life as a user of SOLR a lot easier (I would have saved the hour
of debugging and printing out #getClass on the Objects in NamedList, and on top
of that only had to implement an #emitDoc or #emitDocList function and
optionally #emitHeader and #emitFooter, rather than the rest of the supporting
code).
Am I the only one that's run into a problem trying to write a custom XML SOLR
output that's inherently simple? That is, XML output that doesn't need to worry
about the inherent types of the named values in the NamedList, output that only
cares about spitting out the set of returned Documents?
It would be great to see this get into 1.4, but if I'm the outlier, I can wait.
Just thought I'd raise the issue.
Cheers,
Chris
> 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
> Priority: Minor
> Fix For: 1.5
>
> Attachments: SOLR-1516.Mattmann.101809.patch.txt
>
>
> 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.