Description Usage Arguments Details Examples
Delete documents by ID or query
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
conn |
A solrium connection object, see SolrClient |
ids |
Document IDs, one or more in a vector or list |
name |
(character) A collection or core name. Required. |
commit |
(logical) If |
commit_within |
(numeric) Milliseconds to commit the change, the
document will be added within that time. Default: |
overwrite |
(logical) Overwrite documents with matching keys.
Default: |
boost |
(numeric) Boost factor. Default: |
wt |
(character) One of json (default) or xml. If json, uses
|
raw |
(logical) If |
... |
curl options passed on to crul::HttpClient |
query |
Query to use to delete documents |
We use json internally as data interchange format for this function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
(cli <- SolrClient$new())
# add some documents first
ss <- list(list(id = 1, price = 100), list(id = 2, price = 500))
cli$add(ss, name = "gettingstarted")
# Now, delete them
# Delete by ID
cli$delete_by_id(ids = 1, "gettingstarted")
## Many IDs
cli$delete_by_id(ids = c(3, 4), "gettingstarted")
# Delete by query
cli$search("gettingstarted", params=list(q="*:*")) # apple is there
cli$delete_by_query(query = 'id:apple', "gettingstarted") # delete it
cli$search("gettingstarted", params=list(q='id:apple')) # apple is now gone
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.