Localparams Study notes:
Mainly from the concept, basic syntax, query when the type parameter can be short format, parameter values and parameters reverse reference these aspects:
1 Concepts
Localparams provides a way to add metadata to a parameter type. A further explanation of this parameter type is added.
Suppose we now have a query parameter that already exists:
Q=SOLR Rocks
We use Localparams to prefix the query string to provide more information to the query parser, for example, changing Lucene query parser the default action type is "and" and the default field is "title"
Q={!q.op=and DF=TITLE}SOLR Rocks
2 basic syntax
To represent a localparam, the arguments need to be enclosed in curly braces and begin with an exclamation point inside the curly braces, containing a large number of key=value pairs that are separated by spaces.
So if the original parameter is:
Foo
After applying localparams it will look like this:
{!K1=V1 K2=v2 K3=v3}foo
Since Localparams has only one parameter prefix per key value, there is no design escape operation, but a value that exists as a "key-value pair" needs to be enclosed in quotation marks or double quotation marks and internally escaped with a backslash.
Example: Q={!type=dismax qf= ' myfield Yourfield '}SOLR rocks
3 The type parameter can be short formatted when queried
If a localparams appears without a name, it will be given a default "type" name. That is, for type types, the short format is allowed, and only the parameter values are given.
So there are:
Q={!dismax QF=MYFIELD}SOLR Rocks
Equivalent to:
Q={!type=dismax QF=MYFIELD}SOLR Rocks
4 function of the special parameter V
The direct example illustrates:
Q={!dismax QF=MYFIELD}SOLR Rocks
Equivalent to
Q={!type=dismax Qf=myfield v= ' Solr Rocks '}
5 Parameter Reverse Reference
The direct example illustrates:
Q={!dismax QF=MYFIELD}SOLR Rocks
Equivalent to
Q={!type=dismax Qf=myfield v= $qq}&qq=solr Rocks
SOLR's Localparams study notes