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

Feature: allow to configure host, port and base using product-config #14

Open
naro opened this issue Mar 30, 2012 · 3 comments
Open

Feature: allow to configure host, port and base using product-config #14

naro opened this issue Mar 30, 2012 · 3 comments

Comments

@naro
Copy link

naro commented Mar 30, 2012

Hi,

what about to enable configuration of solr server host/port/base parameters through product config from zope.conf ? I'm wondering how to safely use copy of live site in testing / development environment without polluting solr core used for indexing/search from the live instance. It seems I need to re-configure solr controlpanel every time I update my test/development database from the live server currently and it can be easily forgotten.

I'm not sure what is the best way to implement it though. The best option seems to be change SolrConnectionManager.getConnection and look for product config variables. It would be nice to hide controlpanel host/port/base fields from the form in case of product config variables are found.

Thoughts ?

@mjpieters
Copy link
Member

This is certainly something that we have thought of as well. Adding support for a ZConfig section is actually relatively easy, see this StackOverflow answer.

When those values are present the CP fields should really be set to read-only; show the values but do not allow them to be changed.

@naro
Copy link
Author

naro commented Mar 30, 2012

Yes, I'm working on the implementation right now and it is almost finished. I'll post a link to my fork soon

@naro
Copy link
Author

naro commented Mar 30, 2012

See naro@1985a0d

I'm sorry, I was not able to write tests for this :( I have no idea how to write test for different zope.conf configuration.

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

No branches or pull requests

2 participants