Skip to content

Commit

Permalink
Merge pull request #5026 from jlsherrill/9150
Browse files Browse the repository at this point in the history
fixes #9150 - reindex all distributions on indexing
  • Loading branch information
jlsherrill committed Feb 18, 2015
2 parents a219669 + 88656d5 commit f253d41
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions app/models/katello/glue/elastic_search/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,9 @@ def index_puppet_modules
end

def index_distributions
Katello::Distribution.create_index

distributions = self.distributions.collect { |distribution| distribution.as_json.merge(distribution.index_options) }
distributions.each_slice(Katello.config.pulp.bulk_load_size) do |sublist|
Tire.index Katello::Distribution.index do
import sublist
end unless sublist.empty?
end
#reindex all distributions, much simpler
Tire.index(Katello::Distribution.index).delete
Katello::Distribution.index_all
end

def indexed_puppet_module_ids
Expand Down

0 comments on commit f253d41

Please sign in to comment.