Module: Picolena

Defined in:
lib/picolena/version.rb,
lib/picolena/config/basic.rb,
lib/picolena/templates/config/initializers/006_load_icons.rb,
lib/picolena/templates/config/initializers/002_load_indexed_dirs.rb,
lib/picolena/templates/config/initializers/003_load_white_list_IPs.rb,
lib/picolena/templates/config/initializers/007_load_performance_tweaks.rb,
lib/picolena/templates/config/initializers/005_load_custom_title_and_names_and_links.rb

Overview

:nodoc:

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
FiletypeToIconSymbol =
{}
IndexedDirectories =
{}
IndexSavePath =
File.join(IndexesSavePath,ENV["RAILS_ENV"] || "development")
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 =
[]