You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Umar Shah <um...@wisdomtap.com> on 2008/04/01 11:57:15 UTC

Re: Can We append a field to the response that is not in the index but computed at runtime.

thanks ryan

seems like this would be helpful.
will try it out.

thanks again.
-umar


On Tue, Apr 1, 2008 at 12:13 AM, Chris Hostetter <ho...@fucit.org>
wrote:

>
> : > 2. Augment the documents with a field value -- this is a bit more
> : > complex and runs the risk of name collisions with fields in your
> : > documents.  You can pull the docLIst out from the response and add
> : > fields to each document.
> :
> : this seems more appropriate,
> : I'm okay, to resolve name collision , how do I add the  field.. any
> specific
> : methods to do that?
>
> I *think* the missing step here is that while DocLists can't easily be
> modified, new SolrDocument and SolrDocumentList classes have been
> added since 1.2.  Solr by defualt doesn't use them, but the built in Solr
> ResponseWriters can output them, so your custom component can build a
> SolrDocumentList bsed on the DocList, and add whatever fields you want.
>
> I'm not sure if there are any help methods to do the
> DocList->SolrDocumentList conversion.
>
> (Ryan: keep my honest if this isn't what you had in mind)
>
>
>
>
> -Hoss
>
>