[ 
https://issues.apache.org/jira/browse/SOLR-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779296#action_12779296
 ] 

Chris A. Mattmann commented on SOLR-1516:
-----------------------------------------

bq. I started of with a clean slate. I did not use your patch for reference. 

Why? The end result of what you attached is very similar to the original I 
contributed (with the exception you used SolrInputDocument rather than 
o.a.l.Document -- why? _and_ you added a #writeObject method).

bq. The method names are all arbitrary . header and footer are not familiar in 
Solr's context .

What is Solr's context? Is there a glossary of typical SOLR function names? I 
didn't see a pattern in the existing QueryResponseWriters, not that it would 
have been a big deal anyways since this is really a _new_ set of abstract base 
classes by which to build Document-focused response writers from.

bq. So I did not use it. write*() or emit*() Ii am fine with both

+1 for emit*() since that was the original intention, and since it matches the 
javadoc I spent time and effort to write. 

bq. As I mentioned , it is an idea as a patch and not a real patch. The final 
form may completely differ (including javadocs).

Why is that? Is there a big delta between what I contributed and something that 
meets the criteria for a patch? 

I appreciate your time in reviewing this patch with me.

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
>            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.

Reply via email to