Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/geo_combine/indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def initialize(solr: GeoCombine::Indexer.solr)
@solr = solr
end

def solr_url
@solr.options[:url]
end

# Index everything and return the number of docs successfully indexed
def index(docs, commit_within: ENV.fetch('SOLR_COMMIT_WITHIN', 5000).to_i)
indexed_count = 0
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/geo_combine.rake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace :geocombine do
task :index do
harvester = GeoCombine::Harvester.new
indexer = GeoCombine::Indexer.new
puts "Indexing #{harvester.ogm_path} into #{indexer.solr.url}"
puts "Indexing #{harvester.ogm_path} into #{indexer.solr_url}"
total = indexer.index(harvester.docs_to_index)
puts "Indexed #{total} documents"
end
Expand Down