I just tried this on my VuFind test server, which is running the latest 2.0 master.  This URL:

http://my-server:8080/solr/biblio/select?q=*%3A*&fl=sum%281%2C2%29&wt=xml&indent=true

returns the expected response:

...
<doc><float name="sum(1,2)">3.0</float></doc>
...

So it seems the problem is something specific to your installation.

- Demian

From: Joe Atzberger [joe@booksite.com]
Sent: Friday, June 28, 2013 11:40 AM
To: vufind-tech Tech
Subject: [VuFind-Tech] Solr Function Queries

In attempting to implement externalFileField, I am discovering some unexpected behavior from VuFind's Solr, namely that function queries seem not to work at all.  

If you go query your solr:
/solr/biblio/select?q=*:*&fl=sum%281,2%29

This says, for any documents, give me sum(1,2).  That should come back with 10 documents with:
  <float name="sum(1,2)">3</float> 

I got in touch w/ (Solr expert) Erik Hatcher on #code4lib and both he and others confirmed this behavior with their respective installations.  But the various versions of Solr in VuFind (2.0 branch) we are testing with give back just 10 empty <doc/> tags.  

So this is a blocker to a whole host of features that depend on Solr function queries, and also just a source of weirdness.  Are function queries intentionally disabled for some reason?  

--Joe