Skip to content

examples/vector-search/surreal-deal-store.surql incompatible with surrealdb 3 due to syntax differences #50

Description

@incf-ai

As the title says examples/vector-search/surreal-deal-store.surql doesn't work in surrealdb 3 due to syntax differences

Some of the first errors are related to

DEFINE INDEX review_content 
    ON TABLE review 
    COLUMNS review_text 
    SEARCH ANALYZER blank_snowball BM25 HIGHLIGHTS;

DEFINE INDEX idx_product_name_embedding ON product 
    FIELDS name_embedding 
    MTREE DIMENSION 768 DIST COSINE;

DEFINE INDEX idx_product_details_embedding ON product 
    FIELDS details_embedding 
    MTREE DIMENSION 768 DIST COSINE;

REMOVE INDEX idx_product_details_embedding ON product;
DEFINE INDEX idx_product_details_embedding ON product FIELDS details_embedding MTREE DIMENSION 768 DIST COSINE TYPE F32;

DEFINE INDEX idx_review_text_embedding ON review 
    FIELDS review_text_embedding 
    MTREE DIMENSION 768 DIST COSINE;

I believe the values should be
FULLTEXT instead of SEARCH
HSNW instead of MTREE

There are also issues with function names changing and flexible type fields.
There may be issues with it even after correcting the above, for example I get messages like "Found 'product_sku:01G1RTNSDR9ZGSC0DS9PG7VV7W' for the id field, but a specific record has been specified" and find all tables but one are missing data. I assume I did a poor job of correcting my local copy of the file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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