stepstone-tech / hnswlib-jna

Native-Like Performance for Nearest Neighbor Search in Java Applications using Hnswlib and Java Native Access
Apache License 2.0
32 stars 8 forks source link

Should index automatically be set to initialized = true after load from file? #11

Open paulmallon opened 2 years ago

paulmallon commented 2 years ago

When loading index from file should the index automatically be set to initialized = true ?

        Index newIndex = new Index(SpaceName.L2, graphSettingService.getEmbeddingDimensions());
        newIndex.initialize(); # If not called - ef can not be set
        newIndex.load(new File(path).toPath(), 0);
        newIndex.setEf(graphSettingService.getEfSearch());