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 YonikSeeley:
http://wiki.apache.org/solr/LocalParams

The comment on the change is:
local params - work in progress

New page:
= LocalParams =
LocalParams stands for local parameters... arguments in a Solr request that are 
localized and specific to a parameter.  They provide a way to add meta-data to 
certain argument types such as query strings.

If localparams exist as prefixes to arguments.
Assume have the existing query parameter
{{{q=solr rocks
}}}
We can prefix this query string with localparams to provide more information to 
the query parser, for example changing the default operator type to "AND" and 
the default field to "title" for the lucene query parser.
{{{q={!q.op=AND df=title}solr rocks
}}}

=== Syntax ===
An argument with localparams starts with {{{ {! }}} and the localparams end 
with {{{ } }}} followed by the original argument value.  There may only be one 
localparams prefix per argument, preventing the need for any escaping of the 
original argument.  Name value pairs in localparams are separated by 
whitespace.  Values may be quoted via single or double quotes, and backslash 
escaping works only in quoted strings.

If a localparam value appears without a name, it is given the implicit name of 
"type".  This allows short-form representation for the type of query parser to 
use when parsing a query string.  Thus 
{{{q={!dismax}solr rocks
}}} is equivalent to 
{{{q={!type=dismax}solr rocks
}}}




LocalParams parameter dereferencing can effectively be used to decouple user 
input from query parameters, or front-end GUI from defaults set in 
solrconfig.xml.

Reply via email to