This message was deleted.
# community-help
s
This message was deleted.
j
Typesense doesn't support not equals for arrays of items at the moment. So I would recommend may be adding a field that contains a filename or batchname, and then each time you update with a new batch, set the batchname field to a new value, and then do a delete by query to delete all records which have the old batchname for that field
e
I’ve put a little source key/value pair in the data so i can delete only jobs for specific source
Copy code
"data": {
            "source": "eon_sf",
            "idFS": "eon_196304",
            "idClient": "eon_196304",
            "jobNumber": "219485",
👍 1
Copy code
def delete_by_query(self, collection_name: str, query: str) -> Dict:
        try:
            delete_results = self.client.collections[collection_name].documents.delete(
                {"filter_by": "data.source:eon_sf"}
            )
            return delete_results
        except Exception as e:
            return {"error": f"Delete error: {str(e)}"}