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/09/18 18:05:41 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
------------------------------------------------------------------------------
* Pure negative queries (all clauses prohibited) are allowed.
* {{{-inStock:false}}} finds all field values where inStock is not false
* {{{-field:[* TO *]}}} finds all documents without a value for 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]
+ * A hook into FunctionQuery syntax. Quotes will be necessary to encapsulate the function when it includes parentheses.
* Example: {{{_val_:myfield}}}
- * Example: {{{_val_:recip(rord(myfield),1,2,3)}}}
+ * Example: {{{_val_:"recip(rord(myfield),1,2,3)"}}}
Although not technically a Syntax difference, please note that if you use the Solr "[http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html DateField]" type, any queries on those fields (typically range queries) should use either the Complete ISO 8601 Date syntax that field supports, or the [http://lucene.apache.org/solr/api/org/apache/solr/util/DateMathParser.html DateMath] Syntax to get relative dates. Examples: