diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-09-16 12:43:27 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-09-16 12:43:27 +0100 |
commit | 312f9e1191dd4d7d0e976728561c4b74d8b84588 (patch) | |
tree | 506a615c2bbb95cf7f30a1655ef6ccd7e2d2f521 /vendor | |
parent | 8a0210db99a146a2700a5db0335618423ea756a0 (diff) | |
parent | d54f405434a3b0da5f2c88fc065680caf044aff2 (diff) |
Merge branch 'release/0.3'0.3
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb index 43f0764ca..4671b79da 100644 --- a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb +++ b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb @@ -668,8 +668,8 @@ module ActsAsXapian self.class.to_s + "-" + self.id.to_s end - def xapian_value(field, type = nil) - if self.respond_to?("translations") + def xapian_value(field, type = nil, index_translations = false) + if index_translations && self.respond_to?("translations") if type == :date or type == :boolean value = single_xapian_value(field, type = type) else @@ -756,7 +756,7 @@ module ActsAsXapian for text in self.xapian_options[:texts] ActsAsXapian.term_generator.increase_termpos # stop phrases spanning different text fields # XXX the "1" here is a weight that could be varied for a boost function - ActsAsXapian.term_generator.index_text(xapian_value(text), 1) + ActsAsXapian.term_generator.index_text(xapian_value(text, nil, true), 1) end end |