search for: lettertokenizer

Displaying 5 results from an estimated 5 matches for "lettertokenizer".

2007 Mar 28
6
trouble with PerFieldAnalyzer
...g trouble with PerFieldAnalyzer (ferret version 0.10.14). Script: require ''rubygems'' require ''ferret'' require ''pp'' include Ferret::Analysis include Ferret::Index class TestAnalyzer def token_stream field, input pp field pp input LetterTokenizer.new(input) end end pfa = PerFieldAnalyzer.new(StandardAnalyzer.new()) pfa[:test] = TestAnalyzer.new index = Index.new(:analyzer => pfa) index << {:test => ''foo''} index.search_each(''bar'') Output: :test "" :test "bar" Why is...
2006 Oct 23
2
Trouble with custom Analyzer
Hi! I wanted to build my own custom Analyzer like so: class Analyzer < Ferret::Analysis::Analyzer include Ferret::Analysis def initialize(stop_words = ENGLISH_STOP_WORDS) @stop_words = stop_words end def token_stream(field, string) StopFilter.new(LetterTokenizer.new(string, true), @stop_words) end end As one can easily spot, I essentially want a LetterAnalyzer with stop word filtering. However, using that analyzer (for indexing) results in a segmentation fault. /opt/local/lib/ruby/gems/1.8/gems/ferret-0.10.13/lib/ferret/ index.rb:281: [B...
2007 Jan 19
9
Double-quoted query with "and" fails.
Hi, We''re using Ferret 0.9.4 and we''ve observed the following behavior. Searching for ''fieldname: foo and bar'' works fine while ''fieldname: "foo and bar"'' doesn''t return any results. Is there a way to make ferret recognize the ''and'' inside the query as a search term and not an operator? (I hope I got the
2006 Aug 16
1
StandardAnalyzer not indexing "some"
Hi everybody, In the basic setup acts_as_ferret uses a StandardAnalyzer. How come that it won''t index the headline "some headline" with "some" and "headline". It only uses LetterTokenizer and LowerCaseFilter. Thanks for your help. Michael -- Posted via http://www.ruby-forum.com/.
2007 Apr 03
3
[Repost] Problem with url searching..
Hi all, I''ve posted that few weeks ago but no one answered, but this feature is REALLY important for us. I have many objects with a url field, of course containing standards urls... I''m trying to match them but i actually got problems with that. Here''s a little code of what i would like to achieve: require ''rubygems'' require