You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Cristian Cascetta <cr...@liquida.it> on 2013/08/30 09:59:59 UTC

Solr 4.0 Functions in FL: performance?

Hello,

when I put a function in the Field List, when are field values calculated
and on wich docs?

Are values calculated over the whole set of docs? Only over the resulting
set of doc? Or, better, over the docs actually serialized in results.

i.e. I have 1000 docs in the index, 100 docs matching my query, 10 docs in
my result response because i put &rows=10 in my query.

I put fl=sum(fieldA,fieldB) in my query.

How many times is the sum of fieldA+fieldB executed?

thx,
c.

Re: Solr 4.0 Functions in FL: performance?

Posted by Cristian Cascetta <cr...@liquida.it>.
Whoa that's cool!

It can simplify mani front-end calculations.  - obviously I don't want to
use it to make a simple sum :)

Thanks!

c.


2013/8/30 Andrea Gazzarini <an...@gmail.com>

> Hi,
> not actually sure I got the point but
>
>
>  Are values calculated over the whole set of docs? Only over the resulting
>>
> set of doc? Or, better, over the docs actually serialized in results.
>
> The third: a function is like a "virtual" field computed in real-time
> associated with each (returned) doc.
>
>
>  i.e. I have 1000 docs in the index, 100 docs matching my query, 10 docs in
>>
> my result response because i put &rows=10 in my query.
> I put fl=sum(fieldA,fieldB) in my query.
> How many times is the sum of fieldA+fieldB executed?
>
> 10
>
> Best,
> Andrea
>
>
> On 08/30/2013 09:59 AM, Cristian Cascetta wrote:
>
>> Hello,
>>
>> when I put a function in the Field List, when are field values calculated
>> and on wich docs?
>>
>> Are values calculated over the whole set of docs? Only over the resulting
>> set of doc? Or, better, over the docs actually serialized in results.
>>
>> i.e. I have 1000 docs in the index, 100 docs matching my query, 10 docs in
>> my result response because i put &rows=10 in my query.
>>
>> I put fl=sum(fieldA,fieldB) in my query.
>>
>> How many times is the sum of fieldA+fieldB executed?
>>
>> thx,
>> c.
>>
>>
>

Re: Solr 4.0 Functions in FL: performance?

Posted by Andrea Gazzarini <an...@gmail.com>.
Hi,
not actually sure I got the point but

> Are values calculated over the whole set of docs? Only over the resulting
set of doc? Or, better, over the docs actually serialized in results.

The third: a function is like a "virtual" field computed in real-time 
associated with each (returned) doc.

> i.e. I have 1000 docs in the index, 100 docs matching my query, 10 docs in
my result response because i put &rows=10 in my query.
I put fl=sum(fieldA,fieldB) in my query.
How many times is the sum of fieldA+fieldB executed?

10

Best,
Andrea

On 08/30/2013 09:59 AM, Cristian Cascetta wrote:
> Hello,
>
> when I put a function in the Field List, when are field values calculated
> and on wich docs?
>
> Are values calculated over the whole set of docs? Only over the resulting
> set of doc? Or, better, over the docs actually serialized in results.
>
> i.e. I have 1000 docs in the index, 100 docs matching my query, 10 docs in
> my result response because i put &rows=10 in my query.
>
> I put fl=sum(fieldA,fieldB) in my query.
>
> How many times is the sum of fieldA+fieldB executed?
>
> thx,
> c.
>