I am getting an error when upserting a document (c...
# community-help
s
I am getting an error when upserting a document (codeblock #1) into a collection field (codeblock #2). I am sure I am missing something very obvious. Can you see my mistake?
Copy code
# document being upserted
{
    ...
    "mobilities_stringarr_yesindex_nofacet": [],
    ...
}
Copy code
# collection field
{
    "facet": false,
    "index": true,
    "name": ".*_stringarr_yesindex_nofacet",
    "optional": true,
    "type": "string[]"
},
Copy code
# the error
{
    "message": "Type of field `mobilities_stringarr_yesindex_nofacet` is invalid."
}
k
šŸ‘‹ What error are you getting?
s
Sorry, I sent the message prematurely due to me thinking <Enter> would create a breakline instead of sending the message. I have added it now.
k
I think I fixed a variation of this issue involving an empty array and a field name with regex recently. Do you use Docker?
I can share a build for you to try against.
s
Yes, I use Podman šŸ™‚ Shall I use an rc?
k
Yes, can you please use
0.12.0 rcs13
?
If it still fails, I will be happy to dig further.
s
Thank you, I will report back and try
<https://hub.docker.com/layers/typesense/typesense/0.22.0.rcs13/images/sha256-4957b3da9ad910bed57470a742c6eb8058566c9887d9156d4b726800eb2ec2af?context=explore|0.22.0.rcs13>
šŸ‘ 1
It worked šŸŽ‰
Though I have come across two surprises when running 0.22.0.rcs13. I suspect some not being specific to the RC but to TS in general, and it's very likely I may have fat fingered something. I am happy to provide more debug details if any of these points interest you. • I suspect this issue to be new to 0.22: I cannot do
query_by: id
(anymore) `Collection schema cannot contain a field with name
id
. Ignoring field.` • I suspect this issue to be general to TS, or only the ini-parser. Max length for the master token is approx. 128, this is not documented.
'config file cannot be parsed'
warning occurs in logs, limitation may hypothetically not be present when using env vars
k
1. Because 'id' is a special field and it caused some edge cases / confusion about what it can and cannot do we have decided not to allow a field to be named "id" in the schema. To query a document of a specific ID you can either do a wildcard query and filter_by id or use the /collections/: collection/documents/:id endpoint. 2. Can you post a sample INI file here that I can test locally?