Editing and Updating Schema in Typesense Cloud
TLDR Loic sought help editing their Typesense Cloud Schema and adding search parameters. Jason guided them on how to drop a field and add another parameter for searching.

Jan 25, 2023 (8 months ago)
Loic
06:57 PMDoes it mean that I have to delete the collection or can I edit the schema ? :/
Error: e: Request failed with HTTP code 400 | Server said: Field `priceRetail` is already part of the schema: To change this field, drop it first before adding it back to the schema.
Jason
06:58 PMJason
06:58 PMLoic
07:00 PMI was already trying to do this modification through “Update Schema”
How do you drop a field?
Jason
07:01 PM{
"fields":[
{"name":"priceRetail", "drop": true}, // <== You'd need to add this
{"name":"priceRetail", "type":"float"}
]
}
Loic
07:04 PMLoic
07:35 PMOther stupid question,
in:
Loic
07:35 PMfinal searchParameters = {
'q': 'stark',
'query_by': 'company_name',
'filter_by': 'num_employees:>100',
'sort_by': 'num_employees:desc'
};
await client.collection('companies').documents.search(searchParameters);
Loic
07:36 PM'filter_by': 'num_employees:>100'
?Loic
07:36 PMisShowingRetailPortal:=true
Jason
07:37 PM'filter_by': 'num_employees:>100 && isShowingRetailPortal:=true
Loic
07:37 PM
Typesense
Indexed 2764 threads (79% resolved)
Similar Threads
Updating Documents by Query and Sorting by Float Fields
Saurabh asked how to update documents by query and whether float fields can be used for sorting. Kishore Nallan provided information on updating by query and advised using int64 type instead of float for unix timestamps.

Using Aliases in Typesense Search Queries
Babin had a question about using aliases in Typesense search queries, specifically when passing collection names. Jason helped identify a misconfiguration and provided guidance, resolving the issue.



Sorting Results in Typesense and Handling Errors
Ramees asks about sorting results by distance in Typesense, entering a list of strings as a field, and resolving an error with `fields` format. Kishore Nallan assists with these issues and advises on storing timestamps and proper authentication.

Issue with Typesense Schema and Ruby Client
Mateo faces issues while creating a schema and using Ruby client for Typesense. Jason suggests using a new field instead of 'id' and provides assistance for Ruby client errors.
Understanding and Implementing Typesense Dart Library with Flutter
Alexandro sought help with the Typesense Dart library. Jason explained that the library is in progress, discussed utilizing other HTTP libraries, and provided detailed instructions on utilizing Typesense with Flutter. Alexandro provided feedback on the Typesense UI and expressed interest in creating a tutorial video.


