#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

12
1mo
Solved
Join the chat
Aug 27, 2023 (1 month 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 (1 month 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