Your similarity looks ok.
> My hunch is that I would need to create a specialized type of query, but
it’s not clear to me what it needs to be.
You are right, this requires a query. A similarity alone cannot do this.
You could create a two-phase iterator that reads the norm field and returns
false
Thanks, I got it by doing something like this:
public class PartialSimilarity : DefaultSimilarity
{
public override float Idf(long docFreq, long docCount)
{
return 1.0f;
}
public override float Tf(float freq)
{
return 1.0f;
Hi Mikhail,
You is correct, it should give an ok upper bound of scores on term queries
and combinations of term queries via BooleanQuery.
On Wed, May 22, 2024 at 6:57 PM Mikhail Khludnev wrote:
> I'm trying to understand Impacts. Need help.
> https://github.com/apache/lucene/issues/5270#issueco
I'm trying to understand Impacts. Need help.
https://github.com/apache/lucene/issues/5270#issuecomment-1223383919
Does it mean
advanceShallow(0)
getMaxScore(maxDoc-1)
gives a good max score estem at least for a term query?
On Fri, May 10, 2024 at 11:21 PM Mikhail Khludnev wrote:
> Hello Alessan
Hi Georgios,
This is possible. You need to create a similarity that stores the number of
terms as a norm, and then produce scores that are equal to freq/norm at
search time.
On Tue, May 21, 2024 at 8:02 PM Georgios Georgiadis
wrote:
> Hi,
>
> I would like to extend Similarity to have the follow