Ok. what is you try something like
q=*:*&fq=popularity:(1 OR
7)&rows=100&fl=price,scale(query($scopeq),0,1)&scopeq={!filters
param=$fq}{!func}price
It passes price field values to scale function, limiting the scope of
min,max calculation by fq.
On Wed, Jun 1, 2022 at 4:11 PM Mikhail Khludnev wrot
>From looking at
https://github.com/apache/lucene/blob/main/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java#L70
I conclude that min,max are obtained from all docs in the index.
But if you specify query() as an argument for scale() it takes only
matchin
Hi Mikhail,
sorry for not being clear, I'll try again.
For my understanding the solr scale function, once applied to a field,
needs min and max for that field.
Those min and max values by default are calculated by all the existing
documents, I don't know exactly how this is implemented internally
Vincenzo,
Can you elaborate what it means ' apply the scale function only to the
result set (and not to
the entire collection).' ?
On Tue, May 31, 2022 at 4:33 PM Vincenzo D'Amore wrote:
> Hi Mikhail,
>
> I'm trying to apply the scale function only to the result set (and not to
> the entire col
Hi Mikhail,
I'm trying to apply the scale function only to the result set (and not to
the entire collection).
And I discovered that adding "query($q)" to the scale function does the
trick.
In other words, adding "query($q)" forces solr to restrict the scale
function only to the result set.
But if
Hello Vincenzo,
I'm not getting your point:
> if I add an fq parameter the scale function still continues to work only
on
the q param .
well, but the function actually refers to q param:
scale(sum(price,query($q)), 0, 1).
What's your expectation values of query($q) with "q":"popularity:(1 OR