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

MySolrHA module #29

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

MySolrHA module #29

wants to merge 2 commits into from

Conversation

OteCortes
Copy link

First Version of the MySolrHA module who accepts a dictionary of urls with a Write parameter if is a Solr who accepts indexations or only accept searchs.

The methods search and update has been decorated with the HA module so if connection fails, the module locate another available Solr and resend the command.

The only modification in the mysolr calls is new format to declare the objetc when using mysolrha instead of mysolr.

from mysolrha import Solr
solr=Solr({'http://mainsolr:8100/index':{'write':True},'http://backupsolr:8100/index':{'write':True},'http://mainsolr:8200/index':{'write':False}})
p={'q':'*:*'}
result=solr.search(**p)

Limitations:
-One solr with write permission is needed in object declaration.

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