Hi all,

starting to work on a new project I've found a boost query configured
in a Solr requesthandler.
I would show you how this boost query because I'm interested to have
some suggestions or advice in what are the benefits/drawbacks of this
solution which is new to me.

So let's say that every time the request handler is invoked this BQ is
executed. This BQ is composed with more sub-function.

Before present the BQ, I've to give some context, let's say we have a
field taxonomy that contains few terms (unique) describing the
document, for example:

doc1 - taxonomy: [ "women", "men", "unisex", ... ]
doc2 - taxonomy: [ "men", "most_popular", ... ]
doc3 - taxonomy: [ "women", "accessories", ... ]
[...]

Then in the request handler configuration there are many sub functions
like these:

product(termfreq(taxonomy,accessories),-5.0)
product(termfreq(taxonomy,women),2.0)
product(termfreq(taxonomy,most_popular),5.0)
[...]

This lead to the main function that sums the results of all the
previous functions and then scale them to a value between 1 to 100:

<str name="bq">def(scale(sum(1.0,product(...),product(...),product(...),
[...] ),1.0,100.0),0)</str>

I see that the result of function scale() want to influence the score
of results, the relevance of the query, boosting the documents
matching the terms specified in termfreq().

Comparing the sub function product(termfreq(FIELD,TERM),VALUE) with a
common FIELD:TERM^VALUE, I see that the former will not be affected by
classic (has no TF/IDF) similarity not sure if this can have benefits.

But what I don't really understand the value of the scale function,
what are the benefits to scale the results of all the products fn in a
value between 1 an 100? I'm also a little afraid that the scale
function will not have good performance with a big the number of
documents.

As usual thanks for your time and best regards,
Vincenzo

--
Vincenzo D'Amore

Reply via email to