Re: [EXTERNAL] Re: Question about extending Similarity

2024-05-22 Thread Adrien Grand
following: > > If it’s a partial match, how can I return a score of 0? i.e. if query is > “A B C” and the field contains “B D”, then, I want to say that the score is > 0. This requires knowledge of the sum of scores of all terms, which I am > not sure how I can access. > > My hunch is th

RE: [EXTERNAL] Re: Question about extending Similarity

2024-05-22 Thread Georgios Georgiadis
is that I would need to create a specialized type of query, but it’s not clear to me what it needs to be. Any suggestions? Best, Georgios From: Adrien Grand Sent: Wednesday, May 22, 2024 12:20 AM To: dev@lucene.apache.org Subject: [EXTERNAL] Re: Question about extending Similarity You don&#

Re: Question about extending Similarity

2024-05-22 Thread Adrien Grand
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

Question about extending Similarity

2024-05-21 Thread Georgios Georgiadis
Hi, I would like to extend Similarity to have the following functionality: if the query is "A B C" and a field contains "B C" then I would like to call that a "match" and return a score of 1 (2/2). If the query is "A B C" and the field contains "B D" then I would like to call that a partial matc