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

2008-04-01 Thread Umar Shah
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 <[EMAIL PROTECTED]> wrote: > > : > 2. Augment the documents with a field value -- this is a bit more > : > complex and runs the risk of name collisions with field

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

2008-03-31 Thread Ryan McKinley
On Mar 31, 2008, at 2:43 PM, Chris Hostetter 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. : :

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

2008-03-31 Thread Chris Hostetter
: > 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 na

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

2008-03-31 Thread Siegfried Goeschl
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) Che

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

2008-03-31 Thread Umar Shah
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. >

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

2008-03-31 Thread Ryan McKinley
Two approaches: 1. make a map and add it to the response: rb.rsp.add( "mystuff", mymap ); 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 f

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

2008-03-31 Thread Umar Shah
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

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

2008-03-31 Thread Ryan McKinley
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) t

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

2008-03-28 Thread Umar Shah
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