Module: Picolena

Defined in:
lib/picolena/version.rb,
lib/picolena/config/basic.rb,
lib/picolena/config/environment.rb,
lib/picolena/templates/config/environments/test.rb,
lib/picolena/templates/config/environments/production.rb,
lib/picolena/templates/config/environments/development.rb,
lib/picolena/templates/config/initializers/007_load_icons.rb,
lib/picolena/templates/config/initializers/003_load_indexed_dirs.rb,
lib/picolena/templates/config/initializers/004_load_white_list_IPs.rb,
lib/picolena/templates/config/initializers/008_load_performance_tweaks.rb,
lib/picolena/templates/config/initializers/006_load_custom_title_and_names_and_links.rb

Overview

Disable delivery errors, bad email addresses will be ignored config.action_mailer.raise_delivery_errors = false

Defined Under Namespace

Modules: VERSION

Constant Summary collapse

IndexesSavePath =

Specify indexes path. Storage should be sufficient in order to store all indexed data.

File.join(RAILS_ROOT, 'tmp/ferret_indexes/')
UseLanguageRecognition =

Is more than one language used in indexed documents? Picolena can try to recognise the language used, and save it in the index. It is then possible to look for documents according to their language.

If every document is written in the same language, turning UseLanguageRecognition to false will speed up the indexing process

true
ResultsPerPage =

Results per page

10
HashLength =

Length of “probably unique id” ‘s Those id’s are used to characterize every document, thus allowing tiny URLs in Controllers

HashLength = 10
Document.new("whatever.pdf").probably_unique_id => "bbuxhynait"
HashLength = 20
Document.new("whatever.pdf").probably_unique_id => "jfzjkyfkfkbbuxhynait"

The more documents you have, the bigger HashLength should be in order to avoid collisions. It would not be wise (and specs won’t pass) to specify HashLength smaller than 10.

10
Analyzer =
per_field_analyzer
LOGLEVEL =
Logger::DEBUG
FiletypeToIconSymbol =
{}
IndexedDirectories =
{}
IndexSavePath =

Create directories that will be used by the Indexer

File.join(IndexesSavePath,ENV["RAILS_ENV"] || "development")
MetaIndexPath =
File.join(IndexSavePath,'meta')
ToIgnore =

ToIgnore should not be empty, it would match every filename! So Thumbs.db files are ignored by default.

/^Thumbs\.db$/
WhiteListIPs =
Regexp.new(
  "^("<<
    YAML.load_file(white_list_ip_config_file)["Allow"].collect{|ip|
      ip.downcase.include?("all") ? /.*/ : Regexp.escape(ip)
    }.join("|")<<")"
) rescue /^(127\.0\.0\.1|0\.0\.0\.0)/
IndexingConfiguration =
{}
Extractors =
[]