Resolving Typo in Python Language Documentation
TLDR Ankur pointed out a typo in the Python documentation. Jason at first disagreed but then recognized the mistake, promising to fix it.
Sep 14, 2021 (28 months ago)
Ankur
09:37 PMSmall typo
https://typesense.org/docs/0.21.0/api/documents.html#delete-documents
client.collections['companies'].documents.delete_({'filter_by': 'num_employees:>100'})
the
_
is the typo. Language is python
.Jason
09:38 PMdelete
is a reserved keyword in pythonAnkur
10:00 PMclient.collections['content'].documents.delete_({'filter_by': 'client_id=1'})
...:
...:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-40-dd38c25a6140> in <module>
----> 1 client.collections['content'].documents.delete_({'filter_by': 'client_id=1'})
2
AttributeError: 'Documents' object has no attribute 'delete_'
Jason
10:03 PMimport_
which is a reserved keyword, so we had to an _
.You're right
delete_
is indeed a typo, will fix it.Ankur
10:03 PMJason
10:03 PMTypesense
Indexed 3011 threads (79% resolved)
Similar Threads
Typesense Cloud Issue: Unable to Delete Documents by ID
Ellen had trouble using Typesense Cloud's `filter_by` option to delete documents by id. Jason solved this by suggesting to remove double-quotes around IDs in `filter_by` clause.
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.
Issues Deleting Collection Using Typesense with Enabled CORS
Roman encountered issues deleting collections using typesense with enabled CORS which isn't listed as a common issue in the documentation. Jason tried to provide possible solutions by asking Roman to upgrade to `0.23.0.rc47` and later suggested to open a Github issue after the problem wasn't resolved.