Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

No check for metric value #14

@sstolpovskiy

Description

@sstolpovskiy

Hello,

I have faced the issue:

  1. index is created using default metric in python.
  2. index is read in java with Euclidean metric without error.

On search raised following error:
java.lang.ArrayIndexOutOfBoundsException: 2820
at com.spotify.annoy.ANNIndex.getIntInAnnBuf(ANNIndex.java:133) ~[annoy-0.2.6-SNAPSHOT.jar:na]
at com.spotify.annoy.ANNIndex.getNearest(ANNIndex.java:257) ~[annoy-0.2.6-SNAPSHOT.jar:na]

Where 2820 number depend so how on index size.

I think it should be some check for valid metric.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions