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/16 02:47:16 UTC

FunctionQuery reverted to revision 55 on Solr Wiki

Dear wiki user,

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

The page FunctionQuery has been reverted to revision 55 by YonikSeeley.
The comment on this change is: date fields in the 1.4 example schema do yield ms() and not ord().
http://wiki.apache.org/solr/FunctionQuery?action=diff&rev1=56&rev2=57

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

   . Example Syntax: '''myFloatField'''
   . SolrQuerySyntax Example: '''_val_:myFloatField'''
  
- For date fields, the fieldvalue does not give a strict function of the date. (For example, it doesn't give anything like the number of milliseconds between that date and the epoch.) Instead, it gives the "ord-style" ordinal position of that date compared to other dates in the index. For example, the lowest date in the index will have fieldvalue==0. (See DateFieldSource.java.) For documents with missing date fields, the numeric field value will also be 0.
+ 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.)
  
  For boolean fields (e.g. solr.BoolField), the fieldvalue behavior may not be what you expect. In particular, don't assume that true maps to 1.0 and false to 0.0. At least on a pre-1.4 build, Chris Harris noted that true was mapping to 2.0. The justification (from debugQuery=on) is as follows: " 2.0 = ord(inStock)=2".