lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SearchHandler" by HossMan
Date Wed, 08 Sep 2010 19:03:04 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SearchHandler" page has been changed by HossMan.
The comment on this change is: pull defaults out into a configuration section mentioning appends
and invariants.
http://wiki.apache.org/solr/SearchHandler?action=diff&rev1=28&rev2=29

--------------------------------------------------

  
  '''NOTE:''' Prior  [[Solr1.3]], SearchHandler was named StandardRequestHandler.  StandardRequestHandler
is now a simple subclass of SearchHandler
  
- /!\ :TODO: /!\ Docs are now woefully out of date ... most of the params section should be
moved to pages on each component.
  
  <<TableOfContents(2)>>
  
@@ -47, +46 @@

  
  = Query Params =
  
- In addition to the CommonQueryParameters, HighlightingParameters, SimpleFacetParameters,
and [[MoreLikeThis|MoreLikeThis Parameters]] the Standard Request Handler supports the following
Parameters.  Default parameter values are specified in solrconfig.xml, or overridden  by query-time
values in the request.
+ In addition to the CommonQueryParameters, HighlightingParameters, SimpleFacetParameters,
and [[MoreLikeThis|MoreLikeThis Parameters]] the Standard Request Handler supports the following
Parameters.  
- 
- Example of Defaults...
- {{{
-   <requestHandler name="standard" class="solr.StandardRequestHandler">
-      <lst name="defaults">
-        <int name="rows">10</int>
-        <str name="facet">true</str>
-        <str name="facet.field">category</str>
-      </lst>
-   </requestHandler>
- }}}
  
  == q ==
  
@@ -78, +66 @@

  == df ==
  
  This parameter overrides the default field defined in SchemaXml, if provided.
+ 
+ = Configuration =
+ 
+ In addition to specifying {{{components}}} (or {{{first-components}}} and/or {{{last-components}}})
as mentioned above Request Handlers can be configured with three sets of Query Params...
+ 
+  * {{{defaults}}} - provides default param values that will be used if the param does not
have a value specified at request time. 
+  * {{{appends}}} - provides param values that will be used in addition to any values specified
at request time (or as defaults.
+  * {{{invariants}}} - provides param values that will be used in spite of any values provided
at request time.  They are a way of letting the Solr maintainer lock down the options available
to Solr clients.  Any params values specified here are used regardless of what values may
be specified in either the query, the "defaults", or the "appends" params.
+ 
+ Example of Defaults, Appends, and Invariants...
+ {{{
+   <requestHandler name="standard" class="solr.StandardRequestHandler">
+      <lst name="defaults">
+        <!-- assume they want 50 rows unless they tell us otherwise -->
+        <int name="rows">50</int>
+        <!-- assume they only want popular products unless they provide a different fq
-->
+        <str name="fq">popularity:[1 TO *]</str>
+      </lst>
+     <lst name="appends">
+       <!-- no matter what other fq are also used, always restrict to only inStock products
-->
+       <str name="fq">inStock:true</str>
+     </lst>
+     <lst name="invariants">
+       <!-- don't let them turn on faceting -->
+       <bool name="facet">false</bool>
+     </lst>
+ 
+   </requestHandler>
+ }}}
  
  = Response =
  

Mime
View raw message