Closed Jensxy closed 5 years ago
is it okay for your use case to do an lapply or for loop? e.g.,
ids <- c(1, 5, 8)
lapply(ids, function(z) docs_delete(index='plos', type='article', id=z))
there is the delete by query API, but we don't have it implemented yet https://github.com/ropensci/elastic/issues/195 - does the delete by query API do what you need?
Yes, I will use lapply. Thank you very much.
okay, i am going to implement the delete by query API at some point, so you can try that too when it's done
Okay, that would be nice because lapply takes very long. I don't know if delete by query would improve the performance.
i don't know if it would improve either, we'll see
@Jensxy this is implemented now. remotes::install_github("ropensci/elastic@r6-conn")
see docs_delete_by_query()
I would like to delete multiple documents from a index with a id. For example, I like to delete the documents with the ids test_6, test_7 and test_8. How do I use docs_delete to delete them all at once?