You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2006/09/01 22:42:55 UTC
[Solr Wiki] Update of "StandardRequestHandler" by MikeKlaas
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by MikeKlaas:
http://wiki.apache.org/solr/StandardRequestHandler
The comment on the change is:
updated highlighter params
------------------------------------------------------------------------------
In addition to the CoreQueryParameters, the Standard Request Handler supports the following Query Parameters.
These parameters may be assigned default values in solrconfig.xml which are overridden by query-time settings.
+
+ Further, certain parameters may be overriden on a per-field basis with the following syntax:
+
+ `f.<fieldName>.<originalParam>=<value>`
+
+ eg. `f.contents.hl.snippets=2`
== q ==
@@ -69, +75 @@
The default value is blank (i.e. no extra explain info will be returned)
- == highlight ==
+ == hl ==
- Set to a non-blank value to enable highlighted snippets to be generated in the query response.
+ Set to "`true`" enable highlighted snippets to be generated in the query response.
Any blank or missing value, or "`false`" will disable highlighting.
The default value is blank.
- == highlightFields ==
+ == hl.fl ==
A comma- or space- delimited list of fields to generate highlighted snippets for. Currently, the default if this is left blank is the list of fields that are queried (`qf`).
The default value is blank.
- == maxSnippets ==
+ == hl.snippets ==
- The maximum number of highlighted snippets to generate per field. Note: it is possible for any number of snippets from zero to this value to be generated.
+ The maximum number of highlighted snippets to generate per field. Note: it is possible for any number of snippets from zero to this value to be generated. This parameter accepts per-field overrides.
The default value is "`1`".
+
+ == hl.fragsize ==
+
+ The size, in characters, of fragments to consider for highlighting. "`0`" indicates that the whole field value should be used (no fragmenting). This parameter accepts per-field overrides.
+
+ The default value is "`100`".
+
+ == hl.requireFieldMatch ==
+
+ If `true`, then a field will only be highlit if the query matched in this particular field (normally, terms are highlit in all requested field regardless of which field matched the query).
+
+ The default value is "`false`".
+
+ == hl.formatter ==
+
+ Specify a formatter for the highlight output. Currently the only legal value is "`simple`", which surrounds a highlit term with a customizable pre- and post text snippet. This parameter accepts per-field overrides.
+
+ The default value is "`simple`".
+
+ == hl.simple.pre/hl.simple.post ==
+
+ The text which appears before and after a highlit term when using the `simple` formatter. This parameter accepts per-field overrides.
+
+ The default values are "`<em>`" and "`</em>`"
= Response =
@@ -296, +326 @@
}}}
=== One document with highlighting ===
- `http://worbo.worio.com:8983/solr/select/?stylesheet=&q=solr+xml&version=2.1&start=0&rows=10&indent=on&highlight=true&highlightFields=features,sku&maxSnippets=3`
+ `http://localhost:8983/solr/select/?stylesheet=&q=solr+xml&version=2.1&start=0&rows=10&indent=on&hl=true&hl.fl=features,sku&hl.snippets=3`
{{{
<?xml version="1.0" encoding="UTF-8"?>
<response>