Skip to content

Conversation

mayya-sharipova
Copy link
Contributor

@mayya-sharipova mayya-sharipova commented Jan 25, 2022

LUCENE-10384 and PR #615 introduced encoding into NeighborQueue.
But one function nodes() the encoding was forgotten.

Also modify the test that would fail without this patch.

LUCENE-10384 and PR#615 introduced encoding f into NeighborQueue.
But one function `nodes()` was remained to add this encoding.

Also modify the test that would fail without this patch.
Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, thanks Mayya!

@mayya-sharipova mayya-sharipova merged commit 1a4f838 into apache:main Jan 25, 2022
@mayya-sharipova mayya-sharipova deleted the small-correction-NQ branch January 25, 2022 16:43
HnswGraphBuilder builder =
new HnswGraphBuilder(
vectors, VectorSimilarityFunction.DOT_PRODUCT, 16, 100, random().nextInt());
vectors, VectorSimilarityFunction.EUCLIDEAN, 16, 100, random().nextInt());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why this test was failing? I'm concerned we somehow dropped support for DOT_PRODUCT now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or ... is the idea that you wanted to change the test so that it would verify the correctness of the ordering, because we didn't have any tests using EUCLIDEAN (ie inverted) scores before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msokolov Right, that's correct. Sorry, the modified version of this test would fail without this patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As EUCLIDEAD distance would use reverse ordering of NeighborQueue for results

mayya-sharipova added a commit that referenced this pull request Jan 27, 2022
LUCENE-10384 and PR#615 introduced encoding f into NeighborQueue.
But one function `nodes()` was remained to add this encoding.

Also modify the test that would fail without this patch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants