#community-help

Troubleshooting Typesense Node Embedding Field Error after Upgrade

TLDR Denny was having an error with the embedding field after upgrading a typesense node. Jason revealed that this was a bug in the v0.25.0 version. They suggested upgrading to 0.25.1.rc4 to fix the issue, which Denny did successfully.

Powered by Struct AI

1

Aug 27, 2023 (3 months ago)
Denny
Photo of md5-9ad0e03e3fe5fac2f75e521afcf2a7d7
Denny
02:26 PM
Hi - I just upgraded my typesense node to 0.25.0, and created a new database with an embedding float[] field. However, when trying to query (using typesense-python 0.16 and curl), I’m getting this error: {“results”:[{“code”:400,“error”:“Field embedding should be a string or a string array.“}]}

Same as the issue below, however not sure what the solution is.

https://github.com/typesense/typesense/issues/1172
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:40 PM
Could you follow the exact set of curl commands and post the output here?
02:40
Jason
02:40 PM
Also could you do a GET /debug and verify if you’re indeed running 0.25?
Denny
Photo of md5-9ad0e03e3fe5fac2f75e521afcf2a7d7
Denny
03:25 PM
{"state":1,"version":"0.25.0"}
03:26
Denny
03:26 PM
curl "https://{XXXXXXX}." \
        -X POST \
        -H "Content-Type: application/json" \
        -H "X-TYPESENSE-API-KEY: {API_KEY}" \
        -d '{
          "searches": [
            {
              "collection": "products_v1",
              "q": "clothes",
              "query_by": "embedding",
              "prefix": false,
              "exclude_fields": "embedding"
            }
          ]
        }'
03:26
Denny
03:26 PM
Output:
{"results":[{"code":400,"error":"Field `embedding` should be a string or a string array."}]}
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
04:10 PM
Are you trying this on Mac OS?
Denny
Photo of md5-9ad0e03e3fe5fac2f75e521afcf2a7d7
Denny
04:27 PM
yes
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
09:04 PM
Ah I see what's happening. v0.25.0 has a bug where if an auto-embedding field was added to an existing collection via a schema change, then the auto-embedding doesn't kick-in.

We've fixed this issue in 0.25.1.rc4. Could you upgrade to this and try again?

(You might have to drop this field and re-add it back after the upgrade)
Aug 28, 2023 (3 months ago)
Denny
Photo of md5-9ad0e03e3fe5fac2f75e521afcf2a7d7
Denny
05:19 AM
I noticed that the API went offline during the update. Is this normal?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
05:26 AM
Yes single node cluster needs to be upgraded by taking it offline. HA cluster is rotated node by node so won't affect requests.
Denny
Photo of md5-9ad0e03e3fe5fac2f75e521afcf2a7d7
Denny
11:26 AM
Upgrading to 0.25.1rc4 fixed the issue, 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

Similar Threads

Issues with Cluster Upgrade and Embedding Field

Gustavo had issues upgrading their cluster and their embedding field wasn't being filled. Jason helped to solve the upgrade issue and advised re-indexing the documents to solve the embedding field issue. Both problems were successfully resolved.

8

72
3mo

Issue with Embedding Error in Version 0.25.0.rc63

Bill reported a bug in version 0.25.0.rc63 regarding a problem with updating or emplacing a document and receiving an embedding error. This was resolved in version 0.25.0.rc65, but further discussion ensued regarding the function of 'index' in the update feature.

5

63
4mo

Utilizing Vector Search and Word Embeddings for Comprehensive Search in Typesense

Bill sought clarification on using vector search with multiple word embeddings in Typesense and using them instead of OpenAI's embedding. Kishore Nallan and Jason informed him that their development version 0.25 supports open source embedding models. They also resolved Bill's concerns regarding search performance, language support, and limitations in the search parameters.

11

225
4mo

Error in Implementing Vector Search

Krish faced an error while implementing vector search. After recreating the collection as suggested by Kishore Nallan, the issue was resolved.

2

18
8mo

Troubleshooting Typesense Query Freezes

Manish experienced an issue where their Typesense query freezes. After several checks and attempts to fix the issue, Jason identified that the problem was due to 'embedding' being included in 'query_by'. Removing 'embedding' resolved the issue.

2

21
2mo