lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctarg...@apache.org
Subject lucene-solr:branch_7_6: SOLR-13023: Ref Guide: Add section to blob store docs on how to delete blobs
Date Fri, 30 Nov 2018 18:34:06 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7_6 3b7b8ac02 -> d30d6b89f


SOLR-13023: Ref Guide: Add section to blob store docs on how to delete blobs


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/d30d6b89
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d30d6b89
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d30d6b89

Branch: refs/heads/branch_7_6
Commit: d30d6b89f3152df3fd671aaae5f18919346dd106
Parents: 3b7b8ac
Author: Cassandra Targett <ctargett@apache.org>
Authored: Fri Nov 30 12:31:03 2018 -0600
Committer: Cassandra Targett <ctargett@apache.org>
Committed: Fri Nov 30 12:33:59 2018 -0600

----------------------------------------------------------------------
 solr/solr-ref-guide/src/blob-store-api.adoc | 34 ++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d30d6b89/solr/solr-ref-guide/src/blob-store-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/blob-store-api.adoc b/solr/solr-ref-guide/src/blob-store-api.adoc
index 77cb2c4..941be1f 100644
--- a/solr/solr-ref-guide/src/blob-store-api.adoc
+++ b/solr/solr-ref-guide/src/blob-store-api.adoc
@@ -18,9 +18,12 @@
 
 The Blob Store REST API provides REST methods to store, retrieve or list files in a Lucene
index.
 
-It can be used to upload a jar file which contains standard Solr components such as RequestHandlers,
SearchComponents, or other custom code you have written for Solr. Schema components _do not_
yet support the Blob Store.
+It can be used to upload a jar file which contains standard Solr components such as RequestHandlers,
SearchComponents,
+or other custom code you have written for Solr. Schema components _do not_ yet support the
Blob Store.
 
-When using the blob store, note that the API does not delete or overwrite a previous object
if a new one is uploaded with the same name. It always adds a new version of the blob to the
index. Deletes can be performed with standard REST delete commands.
+When using the blob store, note that the API does not delete or overwrite a previous object
if a new one is uploaded with the same name.
+It always adds a new version of the blob to the index.
+Because the `.system` collection is a standard Solr collection, deleting blobs is the same
as deleting documents.
 
 *The blob store is only available when running in SolrCloud mode.* Solr in standalone mode
does not support use of a blob store.
 
@@ -106,6 +109,10 @@ curl -X POST -H 'Content-Type: application/octet-stream' --data-binary
@test1.ja
 ====
 --
 
+Note that by default, the blob store has a limit of 5Mb for any blob. This can be increased
if necessary
+by changing the value for the `maxSize` setting in `solrconfig.xml` for the `.system` collection.
+See the section <<configuring-solrconfig-xml.adoc#configuring-solrconfig-xml,Configuring
solrconfig.xml>> for information about how to modify `solrconfig.xml` for any collection.
+
 A GET request will return the list of blobs and other details:
 
 [.dynamic-tabs]
@@ -242,3 +249,26 @@ For example, to use a blob named test, you would configure `solrconfig.xml`
like
 If there are parameters available in the custom handler, you can define them in the same
way as any other request handler definition.
 
 NOTE: Blob store can only be used to dynamically load components configured in `solrconfig.xml`.
Components specified in `schema.xml` cannot be loaded from blob store.
+
+== Deleting Blobs
+
+Once loaded to the blob store, blobs are handled very similarly to usual indexed documents
in Solr.
+To delete blobs, you can use the same approaches used to delete individual documents from
the index,
+namely Delete By ID and Delete By Query.
+
+For example, to delete a blob with the id `test/1`, you would issue a command like this:
+
+[source,text]
+curl -H 'Content-Type: application/json' -d '{"delete": {"id": "test/1"}}' http://localhost:8983/solr/.system/update?commit=true
+
+Be sure to tell Solr to perform a <<updatehandlers-in-solrconfig.adoc#commits,commit>>
as part of the request
+ (`commit=true` in the above example) to see the change immediately.
+If you do not instruct Solr to perform a commit, Solr will use the `.system` collection autoCommit
settings,
+which may not be the expected behavior.
+
+You can also use the delete by query syntax, as so:
+
+[source,text]
+curl -H 'Content-Type: application/json' -d '{"delete": {"query": "id:test/1"}}' http://localhost:8983/solr/.system/update?commit=true
+
+For more on deleting documents generally, see the section <<uploading-data-with-index-handlers.adoc#sending-json-update-commands,Sending
JSON Update Commands>>.


Mime
View raw message