TLDR James struggled to index documents from CouchDB, resulting in errors. Kishore Nallan advised checking field definitions and the document's nature. Jason suggested missing "await" statements might cause issues.
Can you please tell me what error you are getting?
but x_top is there in the document, here's a gist to the code
The collection schema defines a `'default_sorting_field': 'x_top'` If you define a default sorting field, that value should always be present in the document. The document you tried to index didn't have this field.
it does have
Can you please try inserting one document outside separately? I'm pretty sure that one of the document is not having that field. You can try catching that exception and printing the value of the document.
verified?
I don't follow you
these are the values of the doc
To unblock, remove the `default_sorting_field` configuration and see if it works.
it throws a new error
Then there is something is certainly wrong in the document you are passing into Typesense, Please look carefully.
this is the entire document, can't seem to see anything wrong
Can you please update this gist(
I'm getting the data from my couchdb database
James On a side note, it looks like Lines 121 and 126 are missing "await"
Also, doesn't Line 4 need an await or callback of sorts? I'd imagine `.get` is async, when getting data from couchdb
Essentially, you want to make sure that "doc" is an actual JS object when you console.log it just before sending it to Typesense
James
Wed, 02 Feb 2022 11:05:56 UTCHello guys, So I'm getting the doc from my couchdb but the when I try to index if it my collection is doesn't work, does anyone know the cause of this issue?