exsolr v0.0.1 Exsolr.Indexer

Provides functions that write documents to Solr

Summary

Functions

Commit changes into Solr

Function to delete all documents from the Solr Index

Delete the document with id id from the solr index

Builds the delete_by_id request body

Functions

add(document)
commit()

Commit changes into Solr

delete_all()

Function to delete all documents from the Solr Index

https://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F

delete_by_id(id)

Delete the document with id id from the solr index

From the Solr docs:

The JSON update format allows for a simple delete-by-id. The value of a delete can be an array which contains a list of zero or more specific document id’s (not a range) to be deleted. For example, a single document:

{ “delete”: { “id”: “myid” } }

https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers#UploadingDatawithIndexHandlers-JSONFormattedIndexUpdates

delete_by_id_json_body(id)

Builds the delete_by_id request body

Examples

iex> Exsolr.Indexer.delete_by_id_json_body(27)
~s({"delete":{"id":"27"}})

iex> Exsolr.Indexer.delete_by_id_json_body("42")
~s({"delete":{"id":"42"}})