Permalink
Browse files

Merge branch 'master' of github.com:mojombo/jekyll

* 'master' of github.com:mojombo/jekyll:
  Slight stylistic tweak to LSI initialisation.
  faster_lsi: Massively accelerate LSI performance.
  • Loading branch information...
2 parents cbbf8b4 + faf5e44 commit 8fb36ab064225ab40076d2801c711c576fe751b6 @parkr parkr committed Jan 17, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/jekyll/post.rb
View
@@ -183,9 +183,12 @@ def related_posts(posts)
if self.site.lsi
self.class.lsi ||= begin
- puts "Running the classifier... this could take a while."
- lsi = Classifier::LSI.new
+ puts "Starting the classifier..."
+ lsi = Classifier::LSI.new(:auto_rebuild => false)
+ $stdout.print(" Populating LSI... ");$stdout.flush
posts.each { |x| $stdout.print(".");$stdout.flush;lsi.add_item(x) }
+ $stdout.print("\n Rebuilding LSI index... ")
+ lsi.build_index
puts ""
lsi
end

0 comments on commit 8fb36ab

Please sign in to comment.