O'Reilly logo

Apache Solr Beginner's Guide by Alfredo Serafini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – adding a default parameter to a handler

All the parameters seen till now can also be used to configure a new request handler.

  1. It's very simple to configure new search handlers, and add some default parameters to them. For example we could add a new configuration to our paintings core (to its solrconfig.xml file):
    <requestHandler name="/search_by_width/" class="solr.StandardRequestHandler"> <lst name="defaults"> <int name="rows">3</int> <str name="wt">json</str> <str name="indent">true</str> <bool name="omitHeader">true</bool> </lst> <lst name="appends"> <str name="fq">abstract:painting AND sea</str> <str name="fq">title:* AND artist:*</str> </lst> <lst name="invariants"> <str name="fl">title,artist</str> <str name="fq">width:{0 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required