Hi folks,
I had to solve a similiar problem with SOLR 1.2 and used a custom
org.apache.solr.request.QueryResponseWriter - you can trigger your
custom response writer using SOLR admin but it is not an elegant
solution (I think the XMWriter is a final class therefore some
copy&waste code)
Cheers,
Siegfried Goeschl
Umar Shah wrote:
On Mon, Mar 31, 2008 at 7:38 PM, Ryan McKinley <[EMAIL PROTECTED]> wrote:
Two approaches:
1. make a map and add it to the response:
rb.rsp.add( "mystuff", mymap );
I tried using both Map/ NamedList
it appends to the results
I have to attach each document with corresponding field.
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?
If #1 works, go with that...
ryan
On Mar 31, 2008, at 9:51 AM, Umar Shah wrote:
thanks ryan for the reply.
I have looked at the prepare and process methods in
SearchComponents(Query,
Filter etc).
I'm using all the default components to prepare and then process the
reults.
and then prepare a custom field after iterating through all the
documents in
the result set. After having created this field for each document
how do I
add corresponding custom field to each document in the response set.
On Mon, Mar 31, 2008 at 6:25 PM, Ryan McKinley <[EMAIL PROTECTED]>
wrote:
Without writing any custom code, no.
If you write a "SearchComponent"
http://wiki.apache.org/solr/SearchComponent
-- you can programatically change the response at runtime.
ryan
On Mar 28, 2008, at 3:38 AM, Umar Shah wrote:
Hi,
I wanted to know whether we can append a field (Fdyn say) to each
doc in the
returned set
Fdyn is computed as some complex function of the fields stored in
the index
during the runtime in SOLR.
-umar