Skip to content

MySolrHA module#29

Open
OteCortes wants to merge 2 commits into
RedTuna:devfrom
OteCortes:master
Open

MySolrHA module#29
OteCortes wants to merge 2 commits into
RedTuna:devfrom
OteCortes:master

Conversation

@OteCortes

Copy link
Copy Markdown

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