similar to: QueryParser doesn''t use StandardAnalyzer correctly?

Displaying 20 results from an estimated 700 matches similar to: "QueryParser doesn''t use StandardAnalyzer correctly?"

2006 Apr 11
2
setting the default operator on a QueryParser
Hi all, Thanks to the authors for the amazing work on Ferret! I have a question about setting up the standard operators on a QueryParser. I would like my parser to default to AND queries rather than the default OR. In Java I would simply do: QueryParser parser = new QueryParser("contents", new StandardAnalyzer()); parser.setDefaultOperator(QueryParser.Operator.AND); But I
2007 Nov 13
8
acts_as_ferret : cannot use a customized Analyzer (as indicated in the AdvancedUsageNotes)
Hi all, I cannot make aaf (rev. 220) use my custom analyzer, despite following the indications @ http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage To pinpoint the problem, I created a model + a simple analyzer with 2 stop words : "fax" and "gsm". test 1 : model.rebuild_index + model.find_by_contents("fax") # fax is a stop word. => I get a
2007 Aug 20
2
can''t stop stop_words
I have looked at the documentation and done some searching, but I can''t seem to stop the STOP_WORDS from cutting out common words. I am using acts_as_ferret and I have add the following to my code: STOP_WORDS = [] acts_as_ferret({ :fields => { :name => { :boost => 10 }, :project_client_company_id => { :boost => 0
2007 Jun 25
4
Ignore apostrophes in words
Hi, I just started using ferret and the aaf plugin and it seems to work quite nicely. However, my fields are very short (titles of music) and I don''t think may users will be typing in apostrophes when they are looking for something. Right now, for a simple document such as "what i''ve done" I''d like it to be indexed as "what ive done" instead. Right
2007 Sep 27
5
QueryParser.parse question
Hi there, I am stomped as to why QueryParser''s parse method behaves differently between query ''a'' and ''b''. See http://pastie.caboo.se/private/4rlwrecyyow3yl6qtf4tq Could someone please help me understand why that is the case. p.s. I also found ''i'' produce the same behavour as ''a'' Cheers, Andy
2005 Nov 17
1
indexing source code
Hi again, I''m using ferret to index source code - DamageControl will allow users to search for text in source code. Currently I''m using the default index with no custom analyzer (I''m using the StandardAnalyzer). Do you have any recommendations about how to write an analyzer that will index source code in a more ''optimal'' way? I.e. disregard common
2007 May 05
4
Stop words, fields, StandardAnalyzer quagmire
Hello, I''m using: Ruby 1.8.6, Rails 1.2.3, ferret 0.11.4, acts_as_ferret from svn stable. I''ve had quite a day wrestling with trying to remove the use of stopwords. The problem was that when searching for words like "no" or "the", no results were found. I found a confusing thing behavior that has taken me some time to figure out, and I hope sharing it
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/.
2018 Mar 21
3
Mean of a row of a data frame
I am trying to get the mean of a row of a data frame. My code follows: roop <- data.frame(x=c(1,2,3),y=c(4,5,2),z=c(0,9,4)) roop mean(roop[1,]) mean(roop[1,c("x","y","z")]) I get the following output: > roop x y z 1 1 4 0 2 2 5 9 3 3 2 4 > mean(roop[1,]) [1] NA Warning message: In mean.default(roop[1, ]) : argument is not numeric or logical:
2018 Mar 21
0
Mean of a row of a data frame
R > rowMeans(roop) [1] 1.666667 5.333333 3.000000 R > mean(as.numeric(roop[1,])) [1] 1.666667 :-) > On Mar 20, 2018, at 10:18 PM, Sorkin, John <jsorkin at som.umaryland.edu> wrote: > > I am trying to get the mean of a row of a data frame. My code follows: > > > roop <- data.frame(x=c(1,2,3),y=c(4,5,2),z=c(0,9,4)) > roop > mean(roop[1,]) >
2006 Oct 24
2
Problem with stop words
I am seeing trouble with searches for ''you'' not returning anything. It appears that ''you'' is a stop word to the standard analyzer: require ''rubygems'' require ''ferret'' index = Ferret::I.new(:or_default => false) index << ''you'' puts index.search(''you'') returns
2006 Aug 28
1
stop words and /''s
Hi new version of ferret and acts as ferret have sorted out the scary glibc *** linked list pointer errors, thank god! New version are good but some searches are still not working. It is mostly the stop words ones. For example the "For Sale/Free/Swap" fails but works when "for" is stripped out. I have read all the recent posts regarding this issue and failed to get it to
2006 May 03
11
Curse words
Hello, I just had a problem with someone cusing on my rail app now is there somthing like Red Cloth that I can use to disable ''dirty words'' -- Posted via http://www.ruby-forum.com/.
2007 Sep 07
5
Custom Analyser .. where to put it ??
Hi, I m trying to use a custom analyser to add my french stop words... i m reading the tutorial at : http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage My problem is that i ve no idea where to put my custom Analyser class like : class GermanStemmingAnalyzer < Ferret::Analysis::Analyzer include Ferret::Analysis def initialize(stop_words = FULL_GERMAN_STOP_WORDS)
2007 Mar 12
5
index.rb:384 [BUG]
Hi folks, I''ve working and playing with acts_as_ferret and follow this fantastic tutorial: http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial When I try to implement the field storage tip, it crash. So, I try to make it via script/console: 1. I have a simple model called Articles: class Article < ActiveRecord::Base acts_as_ferret :fields =>
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
2007 Jan 11
5
stop words in query
Hello all, Quick question, I''m using AAF and the following custom analyzer: class StemmedAnalyzer < Ferret::Analysis::Analyzer include Ferret::Analysis def initialize(stop_words = ENGLISH_STOP_WORDS) @stop_words = stop_words end def token_stream(field, str) StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(str)), @stop_words)) end However when
2007 Nov 09
2
Problem with stemming and AAF
I''m sure I''m missing something completely obvious here, so I hope someone can point me in the right direction! I''ve implemented a basic search with AAF, which works as expected; I''m running a ferret drb server, and using will_paginate to page results. The code in my search_controller.rb: search_text = params[:query] || " " @products =
2006 Sep 22
1
QueryParser bug?
I cooked up a little script to show what I mean. This doesn''t look right to me, but maybe I just completely misunderstand QueryParser. Same output on mswin32, unix, ferret 0.9 and 0.10 Cheers, Sam require ''rubygems'' require ''ferret'' p Ferret::VERSION # 0.10.6 index = Ferret::Index::Index.new() index << {:title => "Programming
2006 Dec 08
4
Using custom stem analyzer giving mongrel errors
I''m using the custom stem analyzer: require ''rubygems'' require ''ferret'' include Ferret module Ferret::Analysis class FerretAnalyzer def initialize(stop_words = FULL_ENGLISH_STOP_WORDS) @stop_words = stop_words end def token_stream(field, text) StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(text)),