Fixing "Field content must be an array" Error
TLDR Sean was facing an error while adding to a collection. Kishore Nallan suggested checking the collection schema. Sean finally resolved it by resetting the array index.
Aug 30, 2023 (3 months ago)
Sean
08:44 AMstring[]
I’m getting an error when adding to the collection that one of my entries is not an array. Field content must be an array.
- I’ve checked the data and everything appears correct. Any ideas as to this might happen? Could there be a value within the array that’s causing it to fail?Kishore Nallan
08:56 AMSean
09:10 AMKishore Nallan
09:23 AMKishore Nallan
09:24 AMcontent
field?Sean
10:07 AM{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "content",
"optional": true,
"sort": false,
"type": "string[]"
},
Kishore Nallan
10:11 AMSean
10:12 AMKishore Nallan
10:18 AMSean
11:16 AMThe error is a 400 RequestMalformed - again, still not able to determine the document yet.
Sean
11:26 AMarray:8 [▶
"content" => array:3 [▶
0 => "10 Km"
1 => "Runthrough Chase The Moon Battersea Park 5k & 10k"
3 => "Transferred"
]
"post_date_timestamp" => 1690786080
"id" => "2719427"
]
Sean
11:37 AMKishore Nallan
11:50 AMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Threading Problem During Multiple Collection Creation and Batch Insertion in Typesense
Johan has a problem with creating multiple collections and batch-inserting documents into Typesense, which is returning results from different collections. Kishore Nallan helps troubleshoot the issue and suggests a potential local race condition, which is fixed in a later build.
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.
Resolving Document Upsert Error
S had an error while trying to upsert a document. Kishore Nallan suggested using a different build (`0.12.0 rcs13`). Issue was resolved but S had other issues relating to "id" usage and INI file parsing, awaiting Kishore Nallan response for these.
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.
Trouble with Document Error in Indexing
Hauke is encountering an error during indexing with a specific field and working to provide Kishore Nallan with a reproducible example. Kishore Nallan gave troubleshooting advice, but issue not yet resolved.