fix(typesense): force position to always be float instead of auto-inferring
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
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.
This commit is contained in:
parent
8181829c9e
commit
50a0674835
@ -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