fix(typesense): force position to always be float instead of auto-inferring
This fixes an issue where it would be impossible to update a task in Typesense when the position for a view of it was previously saved as int64. This happened because the field is created per view on demand and its type is automatically inferred from the data saved. Now, when the first value for a particular position field is a float which could as well be an int (for example, 42.0), that field gets created as an int64 instead of float. Subsequent tries to save a float into that field will then fail. Additionally, errors about this are silently discarded when using bulk insert. That's why the problem was not really debuggable at first. (cherry picked from commit 50a0674835c65b3eb2f0e1f2dd8ae53e9d997eda)
This commit is contained in:
parent
802f661f0d
commit
940d149e2a
@ -184,6 +184,10 @@ func CreateTypesenseCollections() error {
|
||||
Name: "positions",
|
||||
Type: "object",
|
||||
},
|
||||
{
|
||||
Name: "positions.view_.*",
|
||||
Type: "float",
|
||||
},
|
||||
{
|
||||
Name: "buckets",
|
||||
Type: "int64[]",
|
||||
|
Loading…
x
Reference in New Issue
Block a user