: - Solr still uses it's own FunctionQuery instead of what was added : back to Lucene. May want to migrate first, or may want to hold off if : changes are needed that would be easier to make here.
i haven't had a chacne to look at it yet, but i noticed Jira kick out an email recently about a patch being added to SOLR-192 ... probably worth reviewing as you consider this. : - I thought about being able to include queries as a ValueSource (so : one could do functions on relevancy scores). One issue with this is : that some queries need rewriting to work... so rewrite functionality : would need to be added to ValueSource. not neccessarily ... the getValues(IndexReader) method already sort of serves the purpose of rewrite ... a "QueryValueSource" class could rewrite the query in it's getValues method and use the resulting query/weight/scorer in the DocValues object it returns. : - some field values may be sparse... so if you multiplied the : relevancy query by field "myscore" which only existed on a few : documents, you would not want to multiply the scores for other : documents by 0. So either this sems like the kind of thing that could best be dealt with in something like FieldValueSource -- where the underlying ValueSource getting the field value decides what value to use if the doc doesn't have one. -Hoss