Skip to content

Instantly share code, notes, and snippets.

@kevindoran
Last active December 12, 2015 04:18
Show Gist options
  • Select an option

  • Save kevindoran/4713292 to your computer and use it in GitHub Desktop.

Select an option

Save kevindoran/4713292 to your computer and use it in GitHub Desktop.
An example Solr search request handler definition.
<requestHandler name="/broadQuery" class="solr.SearchHandler">
<lst name="defaults">
<str name="defType">edismax</str> <!-- The search parser to use. -->
<str name="wt">xml</str> <!-- Output type. -->
<str name="fl">auction_id title</str> <!-- The fields to list in the search response -->
<str name="qf">Title^2 Feature</str> <!-- The fields (and their weightings) to search in.-->
<str name="rows">100</str> <!-- The number of results to return. -->
<str name="pf">Title^4 Feature^2</str> <!-- Phrase field (and their weightings). Fields to search for closely located matches. -->
<str name="ps">0</str> <!-- Phrase slop. How many tokens apart must words be to be able to qualify as a phrase-->
<str name="echoParams">all</str> <!-- Print the search settings in the search results. Just a handy feature -->
<str name="mm">3&lt;-1 5&lt;-2 6&lt;-40%</str>
<!-- 3>-1 5>-2 6>-40% Means: If there are 1-3 search terms, they are all required to
<!-- match. If there are 4-5 search terms, then (all - 1) must match.
If there are 5-6 search terms, then (all -2) must match
If there are >6 search terms, then (all - 40%) must match. -->
</lst>
</requestHandler>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment