I pretty sure that function queries always work off of indexed values, rather than stored values. So, for example, if you want to use a field in a function query, it needs to be indexed. I want to add this fact to the wiki, where it's not currently stated explicitly, but I wanted to first confirm that it's correct.
Thanks, Chris