Sha256: a3ee47e9e5f0c3153797e568d3604774c9a11e0ef90a177a61c0e821ac1d7bad

Contents?: true

Size: 784 Bytes

Versions: 6

Compression:

Stored size: 784 Bytes

Contents

namespace :searchcraft do
  desc "Recreates search builders' materialized views if necessary"
  task rebuild: :environment do
    puts "Rebuilding search builders' materialized views if necessary"
    puts Benchmark.measure {
      SearchCraft::Builder.rebuild_any_if_changed!
    }
  end

  desc "Recreates all materialized views' indices"
  task recreate_indexes: :environment do
    puts "Recreating search builders' indices"
    puts Benchmark.measure {
      SearchCraft::Builder.recreate_indexes!
    }
  end

  desc "Force recreate all materialize views, including indexes and sequences"
  task force_recreate: :environment do
    puts "Force recreateing search builders' materialized views"
    puts Benchmark.measure {
      SearchCraft::Builder.rebuild_all!
    }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
searchcraft-0.5.2 lib/tasks/builders.rake
searchcraft-0.5.1 lib/tasks/builders.rake
searchcraft-0.5.0 lib/tasks/builders.rake
searchcraft-0.4.2 lib/tasks/builders.rake
searchcraft-0.4.1 lib/tasks/builders.rake
searchcraft-0.4.0 lib/tasks/builders.rake