| Class | Ferret::Analysis::PerFieldAnalyzer |
| In: |
lib/ferret_extensions.rb
|
| Parent: | ::Ferret::Analysis::Analyzer |
This PerFieldAnalyzer is a workaround to a memory leak in ferret 0.11.4. It does basically do the same as the original Ferret::Analysis::PerFieldAnalyzer, but without the leak :)
ferret.davebalmain.com/api/classes/Ferret/Analysis/PerFieldAnalyzer.html
Thanks to Ben from omdb.org for tracking this down and creating this workaround. You can read more about the issue there: blog.omdb-beta.org/2007/7/29/tracking-down-a-memory-leak-in-ferret-0-11-4
# File lib/ferret_extensions.rb, line 18
18: def initialize( default_analyzer = StandardAnalyzer.new )
19: @analyzers = {}
20: @default_analyzer = default_analyzer
21: end
# File lib/ferret_extensions.rb, line 23
23: def add_field( field, analyzer )
24: @analyzers[field] = analyzer
25: end