Why don't we make the response writers deal w/ SolrDocument instead of
lucene Document? That way we can get rid of a lot of ugly code.
SOLR-1516 enables responsewriters to do that

On Tue, Nov 24, 2009 at 6:44 AM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> On Mon, Nov 23, 2009 at 7:04 PM, Chris Hostetter
> <hossman_luc...@fucit.org> wrote:
>> XMLWriter was originally created
>> to be a wrapper arround a java.io.Writer that had convinent heper methods
>> for generating a specific XML response format (ie: wt=xml) back before
>> Solr even supported multiple output types.
>
> Indeed - my longer term plans always included getting rid of it and
> re-implementing as a subclass of TextResponseWriter and getting rid of
> the XMLWriter set of methods on FieldType:
>  /**
>   * Renders the specified field as XML
>   */
>  public abstract void write(XMLWriter xmlWriter, String name,
> Fieldable f) throws IOException;
>
>  /**
>   * calls back to TextResponseWriter to write the field value
>   */
>  public abstract void write(TextResponseWriter writer, String name,
> Fieldable f) throws IOException;
>
>
> ResponseWriters in general have always been very expert level... we
> change as we need to add new features.
> The specific implementations certainly not designed to be subclassed
> by users with any back compat guarantees.   People were not even able
> to subclass XMLWriter in the past.
> http://search.lucidimagination.com/search/document/4d47d6248a54298d/custom_query_response_writer
>
> -Yonik
> http://www.lucidimagination.com
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com

Reply via email to