lib/tasks/index.rake in picky-0.3.0 vs lib/tasks/index.rake in picky-0.9.0
- old
+ new
@@ -1,26 +1,36 @@
# Global.
#
namespace :index do
- desc "Generates the temp tables: Copies the data from the public entries."
- task :generate_temp_tables => :application do
- Indexes.take_snapshot
+ # Not necessary anymore.
+ #
+ # namespace :directories do
+ # desc 'Creates the directory structure for the indexes.'
+ # task :make => :application do
+ # Indexes.create_directory_structure
+ # puts "Directory structure generated."
+ # end
+ # end
+
+ desc "Takes a snapshot, indexes, and caches."
+ task :generate, [:order] => :application do |_, options|
+ randomly = (options.order == 'ordered') ? false : true
+ Indexes.index randomly
end
- desc "rake index:tables:update"
- task :prepare => :application do
+ desc "Generates the index snapshots."
+ task :generate_snapshots => :application do
Indexes.take_snapshot
- Indexes.configuration.index
end
- desc "E.g. Generates a specific index table. Note: temp tables need to be there. Will generate just the index table."
- task :only, [:type, :field] => :application do |_, options|
- type, field = options.type, options.field
- Indexes.generate_index_only type.to_sym, field.to_sym
- end
+ # desc "E.g. Generates a specific index table. Note: intermediate indexes need to be there."
+ # task :only, [:type, :field] => :application do |_, options|
+ # type, field = options.type, options.field
+ # Indexes.generate_index_only type.to_sym, field.to_sym
+ # end
- desc "E.g. Generates a specific index cache file. Note: temp tables need to be there. Will generate index table and cache."
+ desc "Generates a specific index from index snapshots."
task :specific, [:type, :field] => :application do |_, options|
type, field = options.type, options.field
Indexes.generate_index_only type.to_sym, field.to_sym
Indexes.generate_cache_only type.to_sym, field.to_sym
end
\ No newline at end of file