-
Notifications
You must be signed in to change notification settings - Fork 9
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
🌌 Clusterize #2749
base: master
Are you sure you want to change the base?
🌌 Clusterize #2749
Changes from 18 commits
fd34467
243bbe0
ace1134
57db7e1
8df613c
dad22a7
6c46c00
d43a451
40628e7
cc834e2
3b8ba25
922010f
32b39dc
fcec65f
3e46de4
c2175ce
41f6ffc
16f42b7
63540ba
46b465d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,18 @@ | |
# each environment can have a jetty_path with absolute or relative | ||
# (to app root) path to a jetty/solr install. This is used | ||
# by the rake tasks that start up solr automatically for testing | ||
# and by rake solr:marc:index. | ||
# and by rake solr:marc:index. | ||
# | ||
# jetty_path is not used by a running Blacklight application | ||
# at all. In general you do NOT need to deploy solr in Jetty, you can deploy it | ||
# however you want. | ||
# however you want. | ||
# jetty_path is only required for rake tasks that need to know | ||
# how to start up solr, generally for automated testing. | ||
# how to start up solr, generally for automated testing. | ||
|
||
development: | ||
url: http://127.0.0.1:8983/solr/blacklight-core | ||
url: http://127.0.0.1:8983/solr/ | ||
test: | ||
url: http://127.0.0.1:8983/solr/blacklight-core | ||
url: http://127.0.0.1:8983/solr/ | ||
# TODO: Get separate dev and test cores, and change this back to 8888. bug #1 | ||
production: | ||
url: http://127.0.0.1:8983/solr/blacklight-core | ||
url: <%= ENV['SOLR_URL'] || 'http://127.0.0.1:8983/solr/' %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,8 @@ class Solr | |
def initialize | ||
environment = ENV['RAILS_ENV'] || DEFAULT | ||
conf = YAML.load_file(Rails.root + 'config/blacklight.yml') | ||
@connect = RSolr.connect(url: conf[environment]['url']) | ||
solr_url = ENV['SOLR_URL'] || conf[environment]['url'] | ||
@connect = RSolr.connect(url: solr_url + 'blacklight-core') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (see also above comment) Blacklight gem may be expecting the core name to be a part of the configured URL, so we may run into issues by removing it from |
||
end | ||
|
||
attr_reader :connect | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,7 @@ def process_query(query) | |
q = QueryMaker.translate(query) | ||
$LOG.info("Query solr for #{query}") | ||
|
||
@options[:ids] = RSolr.connect(url: 'http://localhost:8983/solr/') | ||
@options[:ids] = RSolr.connect(url: config.solr_url) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (see other related comments) we're leaving the core name off here, but adding it when connecting to Solr in |
||
.get('select', | ||
params: { q: q, fl: 'id', rows: MAX_ROWS } | ||
)['response']['docs'].map { |doc| doc['id'] } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrharpo where does the
config
method come from here?