lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karthick Duraisamy Soundararaj <karthick.soundara...@gmail.com>
Subject Re: MultiSearchHandler - Boosting results of a Query
Date Thu, 13 Sep 2012 19:09:03 GMT
Clarification:
" Once the parser is response aware, its easy for the components to grab
the response and use them. "  In the context of function queries, by
components, I mean various Functions that has been extended from
ValueSource.

On Thu, Sep 13, 2012 at 3:02 PM, Karthick Duraisamy Soundararaj <
karthick.soundararaj@gmail.com> wrote:

> Hello all,
>                 I am making multiple queries in a single url and trying to
> boost the value of a field in the 2nd based on the results of the 1st. To
> achieve this, my function query should be able to have access to the
> response of the first query. However, QParser and QParserPlugin only
> accepts req parameter and does not have any idea about the response.
>
> In a nutshell, all I am trying to do is that, during a serial execution of
>  chain of queries represented by a single url(
> https://issues.apache.org/jira/browse/SOLR-1093), I am trying to
> influence the results of  the second query with the results of the first
> query. To make the function queries ResponseAware, there are two options:
>
> *Option 1: Make all the QueryParsers ResponseAware*
> For this the following changes seem to be inevitable
>         1. Change/overload the createParser definition of QParserPlugin to
> include SolrQueryResponse
>                           createParser(string qstr, SolrParams
> localParams, SolrParams params, SolrQueryResponse rsp)
> -> createParser(string qstr, SolrParams localParams, SolrParams params,
> SolrQueryRequest req, SolrQueryResponse rsp)
>         2. Make similar changes to the getParser function in QPareser
>
>
> *Option 2: Make FunctionQueryParser alone ResponseAware*
> For this, following changes need to be made
>        1. Overload the FunctionQueryParserPlugin's create method with the
> following signature
>                        createParser(string qstr, SolrParams localParams,
> SolrParams params, SolrQueryRequest req, SolrQueryResponse rsp)
>        2. Overload the getParser methong in QParser to permit the extra
> SolrResponse parameter and invoke this call wherever necessary.
>
>
> Once the parser is response aware, its easy for the components to grab the
> response and use them.
>
> This change to interface would mandate changes across the various
> components of SOLR that use all the different kind of parsers but I think
> this would be a useful feature as it has been requested by different people
> at various times. I would appreciate any kind of
> suggestions/feedback. Also, I would be more than happy to discuss if there
> are anyother way of doing the same.
>
>

Mime
View raw message