Re: customizing results in StandardQueryHandler

2008-10-25 Thread Chris Hostetter

: Subject: customizing results in StandardQueryHandler
: In-Reply-To: [EMAIL PROTECTED]

http://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to 
an existing message, instead start a fresh email.  Even if you change the 
subject line of your email, other mail headers still track which thread 
you replied to and your question is hidden in that thread and gets less 
attention.   It makes following discussions in the mailing list archives 
particularly difficult.
See Also:  http://en.wikipedia.org/wiki/Thread_hijacking


-Hoss



customizing results in StandardQueryHandler

2008-10-24 Thread Manepalli, Kalyan
Hi,
In my usecase, I query a set of fields. Then based on the
results, I want to output a customized set of fields. Can I do this
without using a search component?
E:g. I query for fields f1, f2, f3, f4. Now based on some conditions, I
want to output just f1, f3, f4 (the list of final fields may vary). 

How do I rewrite the resultant xml optimally?
Any thoughts on this will be helpful

Thanks,
Kalyan


Re: customizing results in StandardQueryHandler

2008-10-24 Thread Ryan McKinley

isn't this just: fl=f1,f3,f4  etc

or am I missing something?


On Oct 24, 2008, at 12:26 PM, Manepalli, Kalyan wrote:


Hi,
In my usecase, I query a set of fields. Then based on the
results, I want to output a customized set of fields. Can I do this
without using a search component?
E:g. I query for fields f1, f2, f3, f4. Now based on some  
conditions, I

want to output just f1, f3, f4 (the list of final fields may vary).

How do I rewrite the resultant xml optimally?
Any thoughts on this will be helpful

Thanks,
Kalyan




RE: customizing results in StandardQueryHandler

2008-10-24 Thread Manepalli, Kalyan
Ryan,
Actually, what I need is: I always query for a set of fields say
(f1, f2, f3 .. f6). Now once I get the results, based on some logic, I
need to generate the XML which is customized and contains only fields
say (f2, f3, and some new data). 
So the fl will always be (f1 ... f6)



Thanks,
Kalyan Manepalli

-Original Message-
From: Ryan McKinley [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 24, 2008 1:25 PM
To: solr-user@lucene.apache.org
Subject: Re: customizing results in StandardQueryHandler

isn't this just: fl=f1,f3,f4  etc

or am I missing something?


On Oct 24, 2008, at 12:26 PM, Manepalli, Kalyan wrote:

 Hi,
   In my usecase, I query a set of fields. Then based on the
 results, I want to output a customized set of fields. Can I do this
 without using a search component?
 E:g. I query for fields f1, f2, f3, f4. Now based on some  
 conditions, I
 want to output just f1, f3, f4 (the list of final fields may vary).

 How do I rewrite the resultant xml optimally?
 Any thoughts on this will be helpful

 Thanks,
 Kalyan



RE: customizing results in StandardQueryHandler

2008-10-24 Thread Norskog, Lance
Ah!  This will let you post-process result sets with an XSL script:

http://wiki.apache.org/solr/XsltResponseWriter 

-Original Message-
From: Manepalli, Kalyan [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 24, 2008 11:44 AM
To: solr-user@lucene.apache.org
Subject: RE: customizing results in StandardQueryHandler

Ryan,
Actually, what I need is: I always query for a set of fields say
(f1, f2, f3 .. f6). Now once I get the results, based on some logic, I
need to generate the XML which is customized and contains only fields
say (f2, f3, and some new data). 
So the fl will always be (f1 ... f6)



Thanks,
Kalyan Manepalli

-Original Message-
From: Ryan McKinley [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2008 1:25 PM
To: solr-user@lucene.apache.org
Subject: Re: customizing results in StandardQueryHandler

isn't this just: fl=f1,f3,f4  etc

or am I missing something?


On Oct 24, 2008, at 12:26 PM, Manepalli, Kalyan wrote:

 Hi,
   In my usecase, I query a set of fields. Then based on the
results, I 
 want to output a customized set of fields. Can I do this without using

 a search component?
 E:g. I query for fields f1, f2, f3, f4. Now based on some conditions, 
 I want to output just f1, f3, f4 (the list of final fields may vary).

 How do I rewrite the resultant xml optimally?
 Any thoughts on this will be helpful

 Thanks,
 Kalyan



Re: customizing results in StandardQueryHandler

2008-10-24 Thread Ryan McKinley

I'm still not following...

Does the logic depend on the result?  That is, are you asking for doc  
A to have f1,f2 and doc B to have f1,f4?  If that is your question,  
then no -- as is, the ResponseWriter will write the same fields for  
every document.


When you say (f2, f3, and some new data) -- where does the new  
data come from?  Are you trying to augment the results of a document  
with something else?  If so, take a look at the local solr patch in:

 https://issues.apache.org/jira/browse/LUCENE-1387
that adds a distance calculation to each matched document.



On Oct 24, 2008, at 2:43 PM, Manepalli, Kalyan wrote:


Ryan,
Actually, what I need is: I always query for a set of fields say
(f1, f2, f3 .. f6). Now once I get the results, based on some logic, I
need to generate the XML which is customized and contains only fields
say (f2, f3, and some new data).
So the fl will always be (f1 ... f6)



Thanks,
Kalyan Manepalli

-Original Message-
From: Ryan McKinley [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2008 1:25 PM
To: solr-user@lucene.apache.org
Subject: Re: customizing results in StandardQueryHandler

isn't this just: fl=f1,f3,f4  etc

or am I missing something?


On Oct 24, 2008, at 12:26 PM, Manepalli, Kalyan wrote:


Hi,
In my usecase, I query a set of fields. Then based on the
results, I want to output a customized set of fields. Can I do this
without using a search component?
E:g. I query for fields f1, f2, f3, f4. Now based on some
conditions, I
want to output just f1, f3, f4 (the list of final fields may vary).

How do I rewrite the resultant xml optimally?
Any thoughts on this will be helpful

Thanks,
Kalyan






RE: customizing results in StandardQueryHandler

2008-10-24 Thread Manepalli, Kalyan
Populating the field at the index time is a good option. Is there any
other way to do it in search time

Thanks,
Kalyan Manepalli

-Original Message-
From: Ryan McKinley [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 24, 2008 2:14 PM
To: solr-user@lucene.apache.org
Subject: Re: customizing results in StandardQueryHandler

I'm still not following...

Does the logic depend on the result?  That is, are you asking for doc  
A to have f1,f2 and doc B to have f1,f4?  If that is your question,  
then no -- as is, the ResponseWriter will write the same fields for  
every document.

When you say (f2, f3, and some new data) -- where does the new  
data come from?  Are you trying to augment the results of a document  
with something else?  If so, take a look at the local solr patch in:
  https://issues.apache.org/jira/browse/LUCENE-1387
that adds a distance calculation to each matched document.



On Oct 24, 2008, at 2:43 PM, Manepalli, Kalyan wrote:

 Ryan,
   Actually, what I need is: I always query for a set of fields say
 (f1, f2, f3 .. f6). Now once I get the results, based on some logic, I
 need to generate the XML which is customized and contains only fields
 say (f2, f3, and some new data).
 So the fl will always be (f1 ... f6)



 Thanks,
 Kalyan Manepalli

 -Original Message-
 From: Ryan McKinley [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 24, 2008 1:25 PM
 To: solr-user@lucene.apache.org
 Subject: Re: customizing results in StandardQueryHandler

 isn't this just: fl=f1,f3,f4  etc

 or am I missing something?


 On Oct 24, 2008, at 12:26 PM, Manepalli, Kalyan wrote:

 Hi,
  In my usecase, I query a set of fields. Then based on the
 results, I want to output a customized set of fields. Can I do this
 without using a search component?
 E:g. I query for fields f1, f2, f3, f4. Now based on some
 conditions, I
 want to output just f1, f3, f4 (the list of final fields may vary).

 How do I rewrite the resultant xml optimally?
 Any thoughts on this will be helpful

 Thanks,
 Kalyan