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 jimtronic <ji...@gmail.com> on 2013/03/09 21:23:30 UTC

Feeding Custom QueryParser with Nested Query

I've written a custom query parser that we'll call {!doFoo } which takes two
parameters: a field name and a space delimited list of values. The parser
does some calculations between the list of values and the field in question.

In some cases, the list is quite long and as it turns out, the core already
has the information. I think most of my latency in this operation is just
passing big lists around. 

Ideally, I'd like to accomplish something like this:

{!doFoo f=my_field v='query(...)'}

Or, even better, if I could just pass a parameter in and get the results.

{!doFoo with='bar')

Thanks for any advice!
Jim



--
View this message in context: http://lucene.472066.n3.nabble.com/Feeding-Custom-QueryParser-with-Nested-Query-tp4046007.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Feeding Custom QueryParser with Nested Query

Posted by jimtronic <ji...@gmail.com>.
It seems like I could could accomplish this by following the
JoinQParserPlugin logic. I can actually get pretty close using the join
query, but I need to do some extra math in the middle.

The difference in my case is that I need to access the id and the score. I
*think* the logic would go something like this:

1. do sub query to get doc ids and score
2. use the resulting doc ids to feed into another query.
3. write a custom scorer that uses the score from the subquery to determine
the scores of the final results.

Thanks for any suggestions...

Jim



--
View this message in context: http://lucene.472066.n3.nabble.com/Feeding-Custom-QueryParser-with-Nested-Query-tp4046007p4046162.html
Sent from the Solr - User mailing list archive at Nabble.com.