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

The comment on the change is:
Added example for applying multiple filter, and more explaination to other param

------------------------------------------------------------------------------
  
  The common situation for sorting on a field that you do want to be tokenized 
for searching is to use a {{{<copyField>}}} to clone your field.  Sort on one, 
search on the other.
  
+ NOTE:
+ 
+ 1.The space must exist when specifying the sorting order. i.e. they should be 
escaped by a + or %20 in param string
+ 
+ 2.multiple sort order can be assigned by "sort=<field name>[+<order>],<field 
name>[+<order>],..." , order sensitive
+ 
  [[Anchor(start)]]
  == start ==
  
- This parameter is used to paginate results from a query.  When specified, it 
indicates the offset in the complete result set for the queries where the set 
of returned documents should begin. 
+ This parameter is used to paginate results from a query.  When specified, it 
indicates the '''offset in the complete result set''' for the queries where the 
set of returned documents should begin. (i.e. the first record appear in the 
result set is the offset)
  
  The default value is "`0`".
  
  [[Anchor(rows)]]
  == rows ==
  
- This parameter is used to paginate results from a query.  When specified, it 
indicates the maximum number of documents from the complete result set to 
return to the client.
+ This parameter is used to paginate results from a query.  When specified, it 
indicates the '''maximum number of documents''' from the complete result set to 
return to the client for every request. (You can consider it as the maximum 
number of result appear in the page)
  
  The default value is "`10`"
  
@@ -39, +45 @@

  "fq" stands for filter query.
  This parameter can be used to specify a raw lucene query that can be used to 
restrict the super set of documents that can be returned, without influence 
score.  It can be very useful for speeding up complex queries since they 
queries specified with fq are cached independently from the main query.
  
- This param can be specified multiple times, and the filters are additive. A 
single fq value of
+ NOTE: 
+ 
+ 1. This param '''can be specified multiple times'''
+ {{{
+ fq=popularity:[10 TO *]&fq=section:0
+ }}}
+ 
+ 2. The filters are '''additive''' 
+ {{{
+ fq=+popularity:[10 TO *] +section:0
+ }}}
+ A single fq value of
- '''{{{+popularity:[10 TO *] +section:0}}}''' is equivalent to two instances 
of fq with the values '''{{{popularity:[10 TO *]}}}''' and 
'''{{{section:0}}}'''.  fq's are cached independently, so for best efficiency, 
one would want to use the
+ '''{{{+popularity:[10 TO *] +section:0}}}''' is equivalent to two instances 
of fq with the values '''{{{popularity:[10 TO *]}}}''' and 
'''{{{section:0}}}'''.  
- former if those clauses appeared together often, and the latter if they were 
relatively independent.
+ 
+ 3. A single fq can contain multiple filter (aka. '''Pay attention to the 
space in filter content''')
+ 
+ The filter can be specified by single fq
+ {{{
+ fq=+popularity:[10+TO+*] +section:0
+ 
+ fq=+popularity:[10%20TO%20*]%20+section:0
+ }}}
+ Both fq param is valid. 
+ The ''+'' or ''%20'' in the example above meaning '''escaped space''', please 
keep it in the Request when you applying multiple filter.
+ However, when '''you want your filter contain space''', you need to "quote" 
the filter before you put them into the request header:
+ {{{
+ +name:"jack smith" +section:0
+ +name:"Joe smith" +section:0
+ +name:"lee harvey" +section:0 
+ }}}
+ more information please see discussion on "Multiple fq fields in URL" 
(http://www.nabble.com/Multiple-fq-fields-in-URL-td10334495.html)
+ 
+ 4. fq's are '''cached independently''', so for best efficiency, one would 
want to use the former if those clauses appeared together often, and the latter 
if they were relatively independent.
+ 
  
  [[Anchor(fl)]]
  == fl ==

Reply via email to