Float Field Type and Auto Schema Detection Issue in Typesense
TLDR em1nos had problem with auto detection of float field type in Typesense. Jason confirmed and suggested setting the field type explicitly to float.
Powered by Struct AI
4
14mo
Solved
Jul 17, 2022 (14 months ago)
em1nos
em1nos
08:21 PMI'm having an issue with
float
field type and auto schema detection
. It seems that if the first document (that decides the field type with auto schema detection) has a float value with no decimals, it will set the field type to int64
instead. Is this correct and if so is there a solution? I'm using PHP (Laravel) to send the data to Typesense.Jason
Jason
09:07 PMYeah this is expected. Field type is determined by the value sent in the first doc.
09:08
Jason
09:08 PMYou would have to explicitly set the field type to float instead of using schema detection for just that field
em1nos
em1nos
09:10 PMok, thank you
Typesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 2764 threads (79% resolved)
Similar Threads
Resolving Float Value Issues in PHP and Typesense.
Zildjian was having issues with float values being treated as int64 in Typesense. Kishore Nallan identified and rectified the issue, guiding the user through a software upgrade process.


29
2mo
Solved
Issues with Int32 Field in Typesense 0.23.0
michtio had issues with using an int32 field in Typesense 0.23.0, which could contain numeric and null values. Jason asked for further details.
3
14mo
Issue with Dynamic Nested Field Type in TS Collection Schema
Justin encountered an issue with dynamic nested fields not showing as `float`. Jason suggested reproducing the error with a snippet, while Kishore Nallan was tagged for assistance.


14
5mo