Displaying 1 result from an estimated 1 matches for "phrase_part".
Did you mean:
phrase_parts
2008 May 12
1
Using StemFilter with PhraseQuery
...alyzer as follows:
def token_stream(field, str)
...
ts = LowerCaseFilter.new(ts) if @lower
ts = StopFilter.new(ts, @stop_words)
ts = StemFilter.new(ts)
...
end
My use of PhraseQuery is as follows:
def generate_query(phrase)
phrase = phrase.downcase
phrase_parts = phrase.split('' '')
query = Ferret::Search::PhraseQuery.new(:content, 2)
phrase_parts.each do |part|
# puts "part: \"" + part + "\""
query.add_term(part, 1)
end
query
end
-------------- next part --------------
An HTML a...