#community-help

Difficulty Inserting Documents into Typesense Collection

TLDR Moyenul had trouble inserting documents in a Typesense collection. Jason identified that Moyenul was using an outdated Typesense version and suggested updating it, which resolved the issue.

Powered by Struct AI

1

Aug 20, 2023 (3 months ago)
Moyenul
Photo of md5-0ab22f52dc2291f080e7b8c8846ed08b
Moyenul
03:05 PM
Hello, I'm trying to insert documents into a Typesense collection with auto-generated embeddings using the configuration specified in the Typesense schema. However, I'm encountering an error, and the documents are not being inserted as expected.
Here is my schema:
{
  "name": "products",
  "fields": [
    {
      "name": "brand",
      "type": "string"
    },
    {
      "name": "categories",
      "type": "string"
    },
    {
      "name": "embedding",
      "type": "float[]",
      "embed": {
        "from": ["brand", "categories"],
        "model_config": {
          "model_name": "ts/e5-small"
        }
      }
    }
  ]
}

Attempt to insert a document into the "products" collection:
{
  "brand": "apple",
  "categories": "computer"
}

Observe the following error message: 'Field embedding has been declared in the schema, but is not found in the document.'
I have also tried by cloning your repository https://github.com/typesense/showcase-hn-comments-semantic-search . But got the same error.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:55 PM
Could you make sure you’re running v0.25 of Typesense. You can verify the version by doing GET /debug
Moyenul
Photo of md5-0ab22f52dc2291f080e7b8c8846ed08b
Moyenul
03:59 PM
oohhh. got it. how can i move to v0.25?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:00 PM
How do you run Typesense today?
Moyenul
Photo of md5-0ab22f52dc2291f080e7b8c8846ed08b
Moyenul
04:00 PM
cloud
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:00 PM
If you go to your cluster dashboard > Cluster Configuration > Modify, you’ll be able to switch the Typesense version
Moyenul
Photo of md5-0ab22f52dc2291f080e7b8c8846ed08b
Moyenul
04:00 PM
okay
04:00
Moyenul
04:00 PM
thanks

1

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community