Skip to content

Django haystack solrcloud backend #1580

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

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

Conversation

kotrakrishna
Copy link

@kotrakrishna kotrakrishna commented Dec 27, 2017

This is a backend for SolrCloud with ZooKeeper, based on pysolr. The new backend is extension of solr only just that it changes the way conn is made. Hence the change is in initialization only.

Did not write new tests because the change in connection establishment is based on pysolr which is already tested.

@tschale
Copy link

tschale commented Jun 22, 2018

This works, although I had to change the ZooKeeper.CLUSTER_STATE before initializing the ZooKeeper instance, as described in django-haystack/pysolr#224 (comment):

[...]
ZooKeeper.CLUSTER_STATE = '/collections/{}/state.json'.format(connection_options['COLLECTION'])
zookeeper = ZooKeeper(connection_options['URL'])
[...]

Plus, the URL is specified somewhat different from a SolrBackend, which may be documented. Here is what accumulated to my settings:

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'solrcloud_backend.SolrCloudEngine',
        'URL': '127.0.0.1:9983',  # this is the ZooKeeper
        'COLLECTION': 'gettingstarted',  # example SolrCloud collection 
    },
}

@acdha
Copy link
Contributor

acdha commented Jun 22, 2018

Looks like this branch could use an update for the collection name code and then the main blocker would be enabling tests.

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.

3 participants