Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: JavaScript Fix error when searching after load() and view() #484

Merged
merged 2 commits into from
Oct 11, 2024

Commits on Sep 8, 2024

  1. Fix: JavaScript Fix error when searching after load() and view()

    I got an error when I loaded and searched with load() or view().
    
    Code Example:
    ```js
    // Saved with `index.save('index.usearch');` in another script.
    index.load('index.usearch');
    const results = index.search(new Float32Array([0.2, 0.6, 0.4]), 10);
    ```
    
    Error:
    ```
    /build/javascript/dist/cjs/usearch.js:314
            const result = __classPrivateFieldGet(this, _Index_compiledIndex, "f").search(normalizedVectors, k);
                                                                                   ^
    
    TypeError: Search failed
        at Index.search (/build/javascript/dist/cjs/usearch.js:314:80)
        at Object.<anonymous> (/build/example.js:9:21)
        at Module._compile (node:internal/modules/cjs/loader:1469:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
        at Module.load (node:internal/modules/cjs/loader:1288:32)
        at Module._load (node:internal/modules/cjs/loader:1104:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
        at node:internal/main/run_main_module:28:49
    
    Node.js v20.17.0
    ```
    
    This bug fixed.
    abetomo committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    a572eaa View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. Configuration menu
    Copy the full SHA
    18939c7 View commit details
    Browse the repository at this point in the history