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 2007/04/22 18:28:35 UTC

[Solr Wiki] Update of "SolrQuerySyntax" by YonikSeeley

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/SolrQuerySyntax

New page:
The standard Solr Query Parser syntax is a superset of the [http://lucene.apache.org/java/docs/queryparsersyntax.html Lucene Query Parser syntax].

Differences in the Solr Query Parser include
 * Range queries {{{[a TO z]}}} and prefix queries {{{a*}}} are constant-scoring (all matching documents get an equal score).  The scoring factors tf, idf, index boost, and coord are not used.  There is no limitation on the number of terms that match (as there was in past versions of Lucene).
   * Lucene 2.1 has also switched to use !ConstantScoreRangeQuery for it's range queries.
 * A {{{*}}} may be used for either or both endpoints to specify an open-ended range query.
   * {{{field:[* TO 100]}}} finds all field values less than or equal to 100
   * {{{field:[100 TO *]}}} finds all field values greater than or equal to 100
   * {{{field:[* TO *]}}} matches all documents with the field
 * A hook into [http://lucene.apache.org/solr/api/org/apache/solr/search/function/FunctionQuery.html FunctionQuery] via _val_:[http://lucene.apache.org/solr/api/org/apache/solr/search/QueryParsing.html#parseFunction FunctionQuerySyntax]
   * Example: {{{_val_:myfield}}}
   * Example: {{{_val_:recip(rord(myfield),1,2,3)}}}