You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Yonik Seeley <yo...@lucidimagination.com> on 2009/12/24 23:11:28 UTC

Re: [Solr Wiki] Update of "FunctionQuery" by GrantIngersoll

I've noticed that the docs for geo related functions have introduced
the notion of ValueSource.  That's at the Java level, and in the past
I've tried to keep http://wiki.apache.org/solr/FunctionQuery
completely away from that.

-Yonik
http://www.lucidimagination.com


On Thu, Dec 24, 2009 at 7:21 AM, Apache Wiki <wi...@apache.org> wrote:
> 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 GrantIngersoll.
> http://wiki.apache.org/solr/FunctionQuery?action=diff&rev1=51&rev2=52
>
> --------------------------------------------------
>
>
>  Until [[Solr1.5]], all functions were single valued.  Since [[Solr1.5]], it is now possible to write multivalued functions by overriding the appropriate !DocValues methods (the ones that take in an array of the appropriate type, i.e. doubleVal(int doc, double[] vals).  This is often useful when working with [[http://wiki.apache.org/solr/SchemaXml#Poly_Field_Types|Poly Fields]].  Note, however, that these multivalued functions must be aggregated up into a single value function, as the !FunctionQuery itself does not support them.
>
> + See the !MultiValueSource class.
> +
>  See https://issues.apache.org/jira/browse/SOLR-1131
>
> + == Multi Valued Function Support ==
> +
> + === toMultiVS ===
> + <!> Name is subject to change <!>
> + Takes in one or more single valued ValueSource instances and creates a multivalue source.
> +
> + Signature: toMultiVS(x,y,z)
> +
> + === Distances ===
> +
> + dist(), hsine() and sqedist() can work with !MultiValueSources
> +
>

Re: [Solr Wiki] Update of "FunctionQuery" by GrantIngersoll

Posted by Grant Ingersoll <gs...@apache.org>.
On Dec 27, 2009, at 11:13 AM, Yonik Seeley wrote:

> On Sun, Dec 27, 2009 at 7:09 AM, Grant Ingersoll <gs...@apache.org> wrote:
>> 
>> On Dec 24, 2009, at 5:11 PM, Yonik Seeley wrote:
>> 
>>> I've noticed that the docs for geo related functions have introduced
>>> the notion of ValueSource.  That's at the Java level, and in the past
>>> I've tried to keep http://wiki.apache.org/solr/FunctionQuery
>>> completely away from that.
>>> 
>> 
>> Feel free to reword into something that describes aggregating together multiple of these "thingies" into a single multi-"thingy".
> 
> A function can be:
> - a constant
> - a field
> - a function
> 
> Now that a concept of multiple values per document has been added,
> perhaps "vector"?
> So instead of toMultiVS(x,y,z). perhaps vector(x,y,z)?  Or if not
> that, perhaps multi(x,y,z)

Whew.  I'm horrible at naming, and vector sounds much better!  I'll make the change in the code and on the wiki.


Re: [Solr Wiki] Update of "FunctionQuery" by GrantIngersoll

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Sun, Dec 27, 2009 at 7:09 AM, Grant Ingersoll <gs...@apache.org> wrote:
>
> On Dec 24, 2009, at 5:11 PM, Yonik Seeley wrote:
>
>> I've noticed that the docs for geo related functions have introduced
>> the notion of ValueSource.  That's at the Java level, and in the past
>> I've tried to keep http://wiki.apache.org/solr/FunctionQuery
>> completely away from that.
>>
>
> Feel free to reword into something that describes aggregating together multiple of these "thingies" into a single multi-"thingy".

A function can be:
- a constant
- a field
- a function

Now that a concept of multiple values per document has been added,
perhaps "vector"?
So instead of toMultiVS(x,y,z). perhaps vector(x,y,z)?  Or if not
that, perhaps multi(x,y,z)

-Yonik
http://www.lucidimagination.com

Re: [Solr Wiki] Update of "FunctionQuery" by GrantIngersoll

Posted by Grant Ingersoll <gs...@apache.org>.
On Dec 24, 2009, at 5:11 PM, Yonik Seeley wrote:

> I've noticed that the docs for geo related functions have introduced
> the notion of ValueSource.  That's at the Java level, and in the past
> I've tried to keep http://wiki.apache.org/solr/FunctionQuery
> completely away from that.
> 

Feel free to reword into something that describes aggregating together multiple of these "thingies" into a single multi-"thingy".

> 
> 
> On Thu, Dec 24, 2009 at 7:21 AM, Apache Wiki <wi...@apache.org> wrote:
>> 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 GrantIngersoll.
>> http://wiki.apache.org/solr/FunctionQuery?action=diff&rev1=51&rev2=52
>> 
>> --------------------------------------------------
>> 
>> 
>>  Until [[Solr1.5]], all functions were single valued.  Since [[Solr1.5]], it is now possible to write multivalued functions by overriding the appropriate !DocValues methods (the ones that take in an array of the appropriate type, i.e. doubleVal(int doc, double[] vals).  This is often useful when working with [[http://wiki.apache.org/solr/SchemaXml#Poly_Field_Types|Poly Fields]].  Note, however, that these multivalued functions must be aggregated up into a single value function, as the !FunctionQuery itself does not support them.
>> 
>> + See the !MultiValueSource class.
>> +
>>  See https://issues.apache.org/jira/browse/SOLR-1131
>> 
>> + == Multi Valued Function Support ==
>> +
>> + === toMultiVS ===
>> + <!> Name is subject to change <!>
>> + Takes in one or more single valued ValueSource instances and creates a multivalue source.
>> +
>> + Signature: toMultiVS(x,y,z)
>> +
>> + === Distances ===
>> +
>> + dist(), hsine() and sqedist() can work with !MultiValueSources
>> +
>> 

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem using Solr/Lucene: http://www.lucidimagination.com/search