Tim Stoute
03/26/2025, 9:05 PMuid
has been declared in the schema, but is not found in the document." But - I am certain that a uid field is in every one of the 15 documents in the Firestore collection. Other fields do not cause this error. My TypeSense Schema:
{
"created_at": 1743004503,
"default_sorting_field": "createdAt",
"enable_nested_fields": false,
"fields": [
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "administrative_area_level_1",
"optional": true,
"sort": false,
"stem": false,
"store": true,
"type": "string"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "city",
"optional": true,
"sort": false,
"stem": false,
"store": true,
"type": "string"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "copy",
"optional": true,
"sort": false,
"stem": false,
"store": true,
"type": "string"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "countryName",
"optional": true,
"sort": false,
"stem": false,
"store": true,
"type": "string"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "createdAt",
"optional": false,
"sort": true,
"stem": false,
"store": true,
"type": "int64"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "provinceOrState",
"optional": true,
"sort": false,
"stem": false,
"store": true,
"type": "string"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "uid",
"optional": false,
"sort": false,
"stem": false,
"store": true,
"type": "string"
}
],
"name": "questions",
"num_documents": 0,
"symbols_to_index": [],
"token_separators": []
}
Jason Bosco
03/26/2025, 9:06 PMJason Bosco
03/26/2025, 9:06 PMTim Stoute
03/26/2025, 9:08 PMJason Bosco
03/26/2025, 9:29 PMJason Bosco
03/26/2025, 9:29 PMTim Stoute
03/26/2025, 9:44 PMJason Bosco
03/26/2025, 9:55 PMJason Bosco
03/26/2025, 9:55 PMTim Stoute
03/26/2025, 9:58 PMerror.importResults
from the raised exception to get a detailed error reason for each document.
at ImportError.TypesenseError [as constructor] (/workspace/node_modules/typesense/lib/Typesense/Errors/TypesenseError.js2328)
at new ImportError (/workspace/node_modules/typesense/lib/Typesense/Errors/ImportError.js2528)
at Documents.<anonymous> (/workspace/node_modules/typesense/lib/Typesense/Documents.js15439)
at step (/workspace/node_modules/typesense/lib/Typesense/Documents.js4823)
at Object.next (/workspace/node_modules/typesense/lib/Typesense/Documents.js2953)
at fulfilled (/workspace/node_modules/typesense/lib/Typesense/Documents.js2058)
at process.processTicksAndRejections (nodeinternal/process/task queues105:5) {
importResults: [
{
code: 400,
document: '{"administrative_area_level_1":"Ontario","city":"Toronto","countryName":"CA","createdAt":1741982413,"copy":"This is the question copy","provinceOrState":"ON","id":"1Hzs4Ih9JvqAHisW4OBu"}',
error: 'Field uid
has been declared in the schema, but is not found in the document.',
id: '1Hzs4Ih9JvqAHisW4OBu',
success: false
},"Jason Bosco
03/26/2025, 9:59 PMTim Stoute
03/26/2025, 10:01 PMJason Bosco
03/26/2025, 10:44 PMTim Stoute
03/26/2025, 10:49 PMJason Bosco
03/26/2025, 11:46 PMFanis Tharropoulos
03/27/2025, 8:15 AMTim Stoute
03/27/2025, 1:01 PMuid
has been declared in the schema, but is not found in the document."Fanis Tharropoulos
03/27/2025, 1:21 PMerror.importResults
from the raised exception to get a detailed error reason for each document.
at ImportError.TypesenseError [as constructor] (/workspace/node_modules/typesense/lib/Typesense/Errors/TypesenseError.js2328)
at new ImportError (/workspace/node_modules/typesense/lib/Typesense/Errors/ImportError.js2528)
at Documents.<anonymous> (/workspace/node_modules/typesense/lib/Typesense/Documents.js15439)
at step (/workspace/node_modules/typesense/lib/Typesense/Documents.js4823)
at Object.next (/workspace/node_modules/typesense/lib/Typesense/Documents.js2953)
at fulfilled (/workspace/node_modules/typesense/lib/Typesense/Documents.js2058)
at process.processTicksAndRejections (nodeinternal/process/task queues105:5) {
importResults: [
{
code: 400,
document: '{"administrative_area_level_1":"Ontario","city":"Toronto","countryName":"CA","createdAt":1741982413,"copy":"This is the question copy","provinceOrState":"ON","id":"1Hzs4Ih9JvqAHisW4OBu"}',
error: 'Field uid
has been declared in the schema, but is not found in the document.',
id: '1Hzs4Ih9JvqAHisW4OBu',
success: false
},"
importResults: [
{
code: 400,
document: '{"administrative_area_level_1":"Ontario","city":"Toronto","countryName":"CA","createdAt":1741982413,"copy":"This is the question copy","provinceOrState":"ON","id":"1Hzs4Ih9JvqAHisW4OBu"}', <-- Also here
error: 'Field `uid` has been declared in the schema, but is not found in the document.',
**id: '1Hzs4Ih9JvqAHisW4OBu',** <-- Is this not it?
success: false
},"
Tim Stoute
03/27/2025, 1:35 PMTim Stoute
03/28/2025, 12:11 PMFanis Tharropoulos
03/28/2025, 1:57 PM