Class: Ferret::Analysis::PerFieldAnalyzer
- Inherits:
-
Object
- Object
- Ferret::Analysis::PerFieldAnalyzer
- Defined in:
- ext/r_analysis.c
Overview
Summary
The PerFieldAnalyzer is for use when you want to analyze different fields with different analyzers. With the PerFieldAnalyzer you can specify how you want each field analyzed.
Example
# Create a new PerFieldAnalyzer which uses StandardAnalyzer by default
pfa = PerFieldAnalyzer.new(StandardAnalyzer.new())
# Use the WhiteSpaceAnalyzer with no lowercasing on the :title field
pfa[:title] = WhiteSpaceAnalyzer.new(false)
# Use a custom analyzer on the :created_at field
pfa[:created_at] = DateAnalyzer.new