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 2010/04/07 23:31:18 UTC

[Solr Wiki] Update of "FunctionQuery" by ChrisHarris

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "FunctionQuery" page has been changed by ChrisHarris.
The comment on this change is: Clarifying fieldvalue behavior for dates.
http://wiki.apache.org/solr/FunctionQuery?action=diff&rev1=53&rev2=54

--------------------------------------------------

  
   . Example Syntax: '''myFloatField'''
   . SolrQuerySyntax Example: '''_val_:myFloatField'''
+ 
+ For date fields, the fieldvalue behavior is as follows: If the document has a value in that field, then the numeric field value is the number of milliseconds(?) between that date and the epoch. If the document has no value in that field, then the numeric field value is 0. (That is, the default==0 convention still holds for dates.)
  
  == ord ==
  ord(myfield) returns the ordinal of the indexed field value within the indexed list of terms for that field in lucene index order (lexicographically ordered by unicode value), starting at 1. In other words, for a given field, all values are ordered lexicographically; this function then returns the offset of a particular value in that ordering. The field must have a maximum of one value per document (not multiValued).  0 is returned for documents without a value in the field.