lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Sturge <>
Subject Math-generated fields during query
Date Wed, 09 Mar 2011 22:06:33 GMT

I was wondering if it is possible during a query to create a returned
field 'on the fly' (like function query, but for concrete values, not

For example, if I input this query:

For every returned document, I get score = 45.

If I change it slightly to add *:* like this:
   q=*:* _val_:"product(15,3)"&fl=*,score

I get score = 32.526913.

If I try my use case of _val_:"product(qty_ordered,unit_price)", I get
varying scores depending on...well depending on something.

I understand this is doing relevance scoring, but it doesn't seem to
tally with the FunctionQuery Wiki
[example at the bottom of the page]:

...where score will contain the resultant volume.

Is there a trick to getting not a score, but the actual value of
quantity*price (e.g. product(5,2.21) == 11.05)?

Many thanks

View raw message