search for: phrasequeri

Displaying 8 results from an estimated 8 matches for "phrasequeri".

Did you mean: phrasequery
2008 May 12
1
Using StemFilter with PhraseQuery
Hi, I''m having difficulty getting the StemFilter and PhraseQuery to work properly together. When I use a StemFilter with a PhraseQuery, searches only work if the phrase consists of stems. For example, the search phrase "reduces health care" will not work but the phrase "reduce health care" will work even though the exact text "reduces health care" is
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
2006 Jul 14
3
Whitespace Issues
I am trying to build up a filtered search using the logic below. bq = Ferret::Search::BooleanQuery.new bq.add_query(Ferret::Search::TermQuery.new(Ferret::Index::Term.new("section",section.downcase!)), Ferret::Search::BooleanClause::Occur::MUST) filter = Ferret::Search::QueryFilter.new(bq) @vobjects = VoObject.find_by_contents(search_input,:filter => filter, :sort
2007 Feb 15
3
Proximity searching in rdig ferret
Lucene has a syntax "foo bar"~10 for finding foo within 10 words of bar. Does ferret support this feature? (the ~ is used for fuzzy queries) Does rdig? This could be a deal breaker for me ''cos I really need proximity searches -- Posted via http://www.ruby-forum.com/.
2006 Aug 28
1
How should this be done with ferret 0.10.1
Hi i like the new version of ferret, has solved a few of my problems but i''m unsure of how to implement the following code in the new version of ferret? if section if !section.empty? qp = Ferret::QueryParser.new("section") query = qp.parse("\"#{section}\"") bq.add_query(query, Ferret::Search::BooleanClause::Occur::MUST) filter_on =true end
2006 Jan 19
2
Simple Ferret Questions
I am trying to use Ferret for searching for users based on first and last name. In my index, I am adding the first_name, last_name, and a full_name which is basically "#{first_name} #{last_name}". I am searching the index using something like the following query: INDEX.search_each(%Q/first_name:#{query}* OR last_name:#{query}* OR full_name:#{query}*/) do |doc, score| The problem I am
2007 Apr 09
5
highlight crashes
I am trying to use highlight, but I am getting this kind of thing: /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:197:in `highlight'': IO Error occured at <except.c>:93 in xraise (IOError) Error occured in index.c:1222 - lazy_df_get_bytes len = -5, but should be greater than 0 from
2006 Sep 07
7
counting occurences of words in the result set
Hello, I need to be able to count the occurences of certain terms in the reults. Currently my setup is Ferret 0.10.1 aaf bleeding edge. results = VoObject.find_by_contents(query,:offset=>page, :limit=> 20,:sort => sort_fields) I use results.total_hits for pagination. This all works really nicely. However i need to be able to know how many occurences of certain predefined terms occur