Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a collections reload and list method, create connection with URL arg alone #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shark8me
Copy link

For creating a collection, we first need a connection.

(def myconn (http/create "http://localhost:8983/solr"  "mycollection" )
(create-collection myconn "mycollection" 1 )

However, this gives me an error (on Solr version 4.10.2)

org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html.
(html elided)
Problem accessing /solr/mycollection/admin/collections.

We can instead specify a connection that only takes a URL, and returns a connection, which can be used to create a collection.
I've also added 2 methods for listing and reloading collections.

(def myconn (http/create "http://localhost:8983/solr" ))
(flux-col/create-collection myconn "mycollection" 1 )
(flux-col/list-collections myconn )
;add documents
(flux-col/reload-collection myconn "mycollection")
(flux-col/delete-collection myconn "mycollection" )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant