On 8/28/2014 7:43 AM, jimtronic wrote:
> I would like to send only one query to my custom request handler and have the
> request handler expand that query into a more complicated query.
>
> Example:
>
> */myHandler?q=kids+books*
>
> ... would turn into a more complicated EDismax query of:
>
> *"kids books" kids books*
>
> Is this achievable via a Request Handler definition in solrconfig.xml?

As someone else already said, you can write a custom request handler and
reference it in a handler definition in your solrconfig.xml file.  The
sky's the limit for that -- if you can write the code, Solr will use it.

This *specific* example that you've given is something that the edismax
parser will give you out of the box, when you define the qf and pf
parameters.  It will automatically search the individual terms you give
on the fields in the qf parameter, *and* do a phrase search for all
those terms on the fields in the pf parameter.

https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser
http://wiki.apache.org/solr/ExtendedDisMax

Thanks,
Shawn

Reply via email to