Skip to content

Error: Failed to run search on table: Arroy error: Metadata are missing on index 0 #380

@katopz

Description

@katopz

Problem
Got an error for /interfaces/kalosm/examples/live-qa.rs example.

> hi
Error: Failed to run search on table: Arroy error: Metadata are missing on index 0, You must build your database before attempting to read it

Caused by:
    0: Arroy error: Metadata are missing on index 0, You must build your database before attempting to read it
    1: Metadata are missing on index 0, You must build your database before attempting to read it

Steps To Reproduce

Steps to reproduce the behavior. Include a code sample or a link to a repository with the code sample if applicable:

Expected behavior
Bot say hi back.

Environment:

  • Crate version: kalosm = { version = "0.4.0", features = ["language", "metal", "sound", "surrealdb"] }
  • Rust version: 1.87.0
  • OS info: macOS

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later

Workaround

Add random thing before search after create e.g.

    // Create a new document database table
    let document_table = Arc::new(
        db.document_table_builder("documents")
            // Store the embedding database at ./db/embeddings.db
            .at("./db/embeddings.db")
            .build()
            .await
            .unwrap(),
    );

    // Insert an initial document to help build the Arroy index.
    let initial_text = "foo";
    let initial_doc = initial_text.into_document().await.unwrap();
    document_table.insert(initial_doc).await.unwrap();

And it will working as expect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions