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 2009/11/16 14:50:39 UTC

[Solr Wiki] Trivial Update of "FunctionQuery" by YonikSeeley

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 YonikSeeley.
The comment on this change is: testing gui mode for fixing some of the incorrect formatting previously caused by gui mode.
http://wiki.apache.org/solr/FunctionQuery?action=diff&rev1=34&rev2=35

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

  == constant ==
  <!> [[Solr1.3]] Floating point constants.
  
+  . Example Syntax: '''1.5'''
-  . Example Syntax: '''1.5''' SolrQuerySyntax Example: '''_val_:1.5'''
+  . SolrQuerySyntax Example: '''_val_:1.5'''
  
  == fieldvalue ==
  This function returns the numeric field value of an indexed field with a maximum of one value per document (not multiValued).  The syntax is simply the field name by itself.  0 is returned for documents without a value in the field.
  
-  . Example Syntax: '''myFloatField''' SolrQuerySyntax Example: '''_val_:myFloatField'''
+  . Example Syntax: '''myFloatField'''
+  . SolrQuerySyntax Example: '''_val_:myFloatField'''
  
  == 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.
  
   . Example: If there were only three values for a particular field: "apple","banana","pear", then ord("apple")=1, ord("banana")=2, ord("pear")=3
-  Example Syntax: '''ord(myIndexedField)''' Example SolrQuerySyntax: '''_val_:"ord(myIndexedField)"'''
+  Example Syntax: '''ord(myIndexedField)'''
+  . Example SolrQuerySyntax: '''_val_:"ord(myIndexedField)"'''
  
  WARNING: as of Solr 1.4, ord() and rord() can cause excess memory use since they must use a FieldCache entry at the top level reader, while sorting and function queries now use entries at the segment level.  Hence sorting or using a different function query, in addition to ord()/rord() will double memory use.
  
@@ -207, +210 @@

  
  Signature: deg(!ValueSource), rad(!ValueSource)
  
- 
- 
  == top ==
  <!> [[Solr1.4]] Causes it's function query argument to derive it's values from the top-level IndexReader containing all parts of an index.  For example, the ordinal of a value in a single segment will be different from the ordinal of that same value in the complete index.  The ord() and rord() functions implicitly use top() and hence ord(foo) is equivalent to top(ord(foo)).