JSON Error with Empty Arrays in Embedded Field
TLDR Gustavo reported an issue with Typesense returning an error for empty array fields in an embedded field. Jason acknowledged the issue but no solution was provided.
2
Jun 13, 2023 (3 months ago)
Gustavo
10:10 PMfrom
. When I create a document where both arrays are empty, Typesense returns an error saying Unexpected token in JSON at position 14
.Gustavo
10:11 PMGustavo
10:12 PM {
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "segments",
"optional": false,
"sort": false,
"type": "string[]"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "topics",
"optional": false,
"sort": false,
"type": "string[]"
},
{
"embed": {
"from": [
"segments",
"topics"
],
"model_config": {
"api_key": "sk-************************************************",
"model_name": "openai/text-embedding-ada-002"
}
},
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "embedding",
"num_dim": 1536,
"optional": false,
"sort": false,
"type": "float[]"
},
Jason
10:12 PM1
Gustavo
10:13 PM{ segments: [], topics: [] }
.1
Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
Troubleshooting Invalid Field Error in Firestore Document Indexing
Darren receives an error when indexing Firestore documents with empty array in "_grades" field. Jason suggests submitting a bug report and manually setting the schema. The user still experiences issues. Kishore Nallan reproduces the bug, but suggests a solution might exist with an explicit 'string[]' type definition. Further investigation is needed.
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.
Cold Start Problem with Dynamic Collections
Adrian reported cold start issues with dynamic collections. Jason suggested using wildcard `*` for query_by parameters, upgrading to `0.25.0.rc34`, and clarified conventions. Adrian's issues were resolved but they reported a limitation that will potentially be addressed.