You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Mayya Sharipova (Jira)" <ji...@apache.org> on 2021/07/27 14:36:00 UTC

[jira] [Comment Edited] (LUCENE-10034) Vectors NeighborQueue MIN/MAX heap reversed?

    [ https://issues.apache.org/jira/browse/LUCENE-10034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17388054#comment-17388054 ] 

Mayya Sharipova edited comment on LUCENE-10034 at 7/27/21, 2:35 PM:
--------------------------------------------------------------------

Tomoko and Michael, thank you for the discussion. From my side, this part of the code is very clear now.

About naming "similarity" VS "distance",  while "distance" indeed is easier to understand,  IMH,  the current "Similarity" naming for a vector metric function suits Lucene better, as top docs are arranged in a decreasing order of scores, the same way as a "similarity" metric arranges them. 


was (Author: mayya):
Tomoko and Michael, thank you for the discussion. From my side, this part of the code is very clear now.

About naming "similarity" VS "distance",  IMH,  the current "Similarity" naming for a vector metric function suits Lucene better, as top docs are arranged in a decreasing order of scores, the same way as a "similarity" metric arranges them. 

> Vectors NeighborQueue MIN/MAX heap reversed?
> --------------------------------------------
>
>                 Key: LUCENE-10034
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10034
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Mayya Sharipova
>            Priority: Trivial
>
> NeighborQueue is defined as following:
> {code:java}
> NeighborQueue(int initialSize, boolean reversed) {
>   if (reversed) {
>     heap = LongHeap.create(LongHeap.Order.MAX, initialSize);
>   } else {
>     heap = LongHeap.create(LongHeap.Order.MIN, initialSize);
>   }
> }
> {code}
> should it be reversed? should it be instead using MIN heap for reversed functions such as EUCLIDEAN  distance, as we are interested in neigbors with min euclidean distances? 
> I apologize if I missed some broader context where this definition makes sense. 
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org