#community-help

Recreating Index Leads to Facet Fetch & Indexing Errors

TLDR Dima encountered errors after recreating index involving nullable fields. Kishore Nallan needs to look into the issue further.

Powered by Struct AI
Apr 04, 2023 (5 months ago)
Dima
Photo of md5-1b62114a658b760944aa7d2b4c274460
Dima
01:48 PM
Recreated index and started to get some strange errors, maybe someone can help with finding root causes?
01:48
Dima
01:48 PM
> Facet fetch error. Could not locate the JSON document for sequence ID: 219464
01:49
Dima
01:49 PM
And also
> Error while indexing numerical field.[json.exception.type_error.302] type must be number, but is null
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
02:00 PM
Can you explain what you mean by recreating index? Also which version?
Dima
Photo of md5-1b62114a658b760944aa7d2b4c274460
Dima
04:19 PM
I think I found the issue. We have int32 field foo which historically was non-optional, but became nullable. We sent foo: null for such cases, but it looks like we need to omit them instead.

I’m not sure why did we find it only now, while recreating and refilling the index, because schema migration with optional: true was done a few months ago
04:22
Dima
04:22 PM
Ah, maybe it’s because we replaced “upsert” strategy with “emplace”. Is it bug? Looks like upsert eats nullable fields, but emplace not
Apr 05, 2023 (5 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:31 AM
Will look into this