This message was deleted.
# community-help
s
This message was deleted.
j
Side note:
id
need not be included in the schema, since it's a special field. Typesense will auto-generate it, if it doesn't exist when a document is created
Could you share the full curl command you're using to upsert?
d
Ah, I was under the impression I should include it in order to tell TS that I want to manage it myself
curl 'http://localhost:8108/collections/charts/documents/import?action=upsert' -H "X-TYPESENSE-API-KEY: ${TYPESENSE-API-KEY}" -X POST -T ./chart_data.jsonl
j
Could you share the first line of that file?
d
😞 i'm a fool. i see it now, my sql output is wrong, my dev pipeline failed me.
for those in the future, make sure you use the
\t
flag when outputting from postgres so you don't include column names 🙂
😅 1
sorry to bother you Jason!
👍 1
i surprised ts didn't give me an error though, I was using
row_to_json
to get it into a psuedo jsonl format, but it included the column name so the data looked like :
{"row_to_json": {<rowdata>}}
i would have expected ts to tell me that the shape of the data was incompatible with the collection definition, but I only got "success: true" responses
j
Do you have a wild card / auto-schema detection field definition in the schema?
d
no, however I do have a string* definition for one of the fields which is a large json collection that I don't want indexed (only returned)
j
Side note: for fields you don't want to be indexed, you can leave them out of the schema completely, and still send those fields in the document. Any fields not mentioned in the schema will just be stored on disk and returned when the document is a hit
Could you share your full schema definition?
d
oh so that's probably what happened, my entire document was getting stored and not indexed in a field that was called
row_to_json
i didn't realize that either, i thought if it wasn't specified, and no wildcard field included, it would just ignore the data entirely