Following the docs, I should be able to delete by ...
# community-help
y
Following the docs, I should be able to delete by query, using a
filter_by=id:[id1]
filter However, it happens that this command randomly fails to delete the record, but repeating the process either through the same command (js script) or from curl eventually works. How could that be explained / avoided ?
f
Does the record with that id exist for sure? If it does, then do you try to delete it using the client library first or using curl?
y
Yes it exists as i'm inserting it just before deleting for testing purposes
usually first from the js client
f
Are you using Typesense cloud or self-hosting?
y
self hosting
f
What version of Typesense are you on?
y
28
Actually, I wonder if the low delay between insertion and deletion is not the cause of the problem
Is there a delay for inserting in the index and be readily searchable ?
f
How low? Is it happening just after?
y
around one or two seconds
if i wait, say, 5 seconds, it feels like it's working correctly
f
Yes, there's a small delay between insertion time and the indexing being ready for deletion / usage. Is deleting it just after insertion something necessary for your use-case, or is this part of a testing suite?
y
it's only part of the testing suite, i can accomodate a delay of 5 sec
as long as deletion is otherwise reliable
f
Could you try that and see if the issue is fixed? If not, we'd have to see if something else is going on
👍 1
y
yes, thanks
🙌 1