similar to: find_conditions in acts_as_ferret find_by_contents

Displaying 20 results from an estimated 900 matches similar to: "find_conditions in acts_as_ferret find_by_contents"

2007 Jan 15
3
Wrong total_hits when using conditions in find_by_contents
I don''t know if this is a bug, or wanted behavior, but for me it was a pain in... So here''s the problem + a bugfix. Lets say you have a model "Article" with the following fields: title, visible - and these records [code]title, visible ferret talk, 1 ruby talk, 0 ruby on rails, 1 lets talk about ruby, 1[/code] If I let Article act as a ferret, and do: result =
2007 Oct 03
3
Pagination problem with acts_as_ferret
Hi, am using this wonderful plugin acts_as_ferret and according to the tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic I worked it out except the pagination feature. If I have 12 records and I give limit to 10, its correctly displaying 10 records in the first page and is giving the link to the second page too. But when I go to the next page I find the same 10 records instead of
2006 Dec 31
1
How do you use acts_as_ferret without rails?
I am currently using activerecord without rails and I''d like to use the acts_as_ferret plugin as it works well with activerecord. How do I take advantage of the acts_as_ferret without rails installed? Is this possible? If someone could provide me with direction on how this would be done, that would be greatly appreciated. I assume that since active record works without rails that all
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
In my model Topic: acts_as_ferret({ :fields => {:username => {:store => :yes, :boost => 30}, :subject => {:store => :yes, :boost => 20}, :body => {:store => :yes, :boost => 10}}, :remote => true }, { :analyzer => Ferret::Analysis::RegExpAnalyzer.new(/./, false) }) def self.full_text_search(q, options = {}, find_options = {}) return nil if q.nil? or
2006 Dec 01
1
cannot use acts_as_ferret on legacy tables or tables with a
when i used "find_by_contents" on a legacy table with a different primary_key than "id" i always got results=nil even when total_hits was > 0 as a quick fix i changed line 261 in "class_methods.rb" from: conditions = [ "#{self.table_name}.id in (?)", id_array ] to: conditions = [ "#{self.table_name}.#{self.primary_key} in (?)", id_array ]
2007 May 18
1
find_by_contents + ''conditions'' returning incorrect results
I''ve read the other threads like this one (http://www.ruby-forum.com/topic/78841) but I''m not sure what I''m doing wrong. Scenario: I need a full text search on financial institutions and to constrain that list by state (=) or states (IN). My lenders model includes a name and a state, among other fields. In my lenders model: acts_as_ferret :fields => [:name] Running
2006 Nov 02
2
highlighting with find_by_contents
I''m trying to highlight keyword snippets using the highlight method of the results returned from find_by_contents (the actual models), but always come up with an empty array. Any ideas what could be going wrong? -- Posted via http://www.ruby-forum.com/.
2006 Nov 28
1
find_by_contents never finds anything on my model
Hi, Let me preface by saying I am very new to ferret and aaf. Anyhow, I''m using the aaf plugin on a model named Book. This model isnt a typical rails model in the fact that it doesnt have an "id" column as its primary key but instead has a string column named ISBN that is used as the primary key. When I try to search for anything in the model using find_by_contents it never
2007 Aug 23
3
AAF: find_by_contents on AR Association Total Hits
I seem to be getting some behaviour thats unexpected (for me anyway) when using find_by_contents on an ActiveRecord has_many association. The results that are returned are only the records that belong to the model returned, but the total_hits that are being returned appear to be for the whole table. e.g. class Book < AR::Base has_many :pages end class Page < AR::Base belongs_to :book
2007 Oct 15
0
Inconsistent results between multi_search and find_by_contents (is "other" a reserved word?)
I have a Computer type and I''m trying to query agianst it. When I do the query with find_by_contents, I get correct results. However, when I query using multi_search, I get incorrect results. I''m using the most recent version of Acts As Ferret and Ferret This returns the correct results: Computer.find_by_contents( "device_type:laptop AND os_type:other" ) This
2006 Aug 17
1
find_by_contents fails with :include option
find_by_contents will fail if you specify :include in the find_options parameter. The problem is on line 313: 313: conditions = [ "id in (?)", id_array ] 314: # combine our conditions with those given by user, if any 315: if find_options[:conditions] 316: cust_opts = find_options[:conditions].dup 317: conditions.first << " and " << cust_opts.shift 318:
2010 Feb 16
3
[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)
Attached are updated LLVM-OCaml Bindings Tutorial from Chris Wailes. (http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-April/021804.html) We changed them to work with the latest APIs(LLVM2.6 and the latest LLVM from SVN). Does anyone know if there is any realistic project using LLVM-OCaml Bindings? How is the performance? Jianzhou -------------- next part -------------- A non-text attachment was
2007 Mar 18
3
"ö" causes find_by_contents not to return
I''ve installed ferret 0.10.9 together with the latest acts_as_ferret using Windows XP and indexed a location database (geonames.org) with Location.rebuild_index. The data is in utf-8. Now calling Location.find_by_contents "?" does not return a result, causes a lot of CPU load, and finally exits with an error "index.rb:702: in ''parse'': failed to allocate
2007 Jul 18
5
Strange search result with conditions in find_by_contents
Hi, guys: Strange search result with conditions in find_by_contents! first of all, i''ve installed the acts_as_ferret to my project vender folder by ''ruby script/plugin install svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret'' in my SearchController def searchforum if !params[:doSearch].nil? if params[:searchTerms].nil? || params[:searchTerms] ==
2010 Feb 16
0
[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)
On Tuesday 16 February 2010 03:51:00 Jianzhou Zhao wrote: > Does anyone know if there is any realistic project using LLVM-OCaml > Bindings? I've written a VM in OCaml built upon LLVM using LLVM's OCaml bindings: http://www.ffconsultancy.com/ocaml/hlvm/ There are at least two other significant users of LLVM's OCaml bindings, AFAIK. > How is the performance? Performance
2006 Sep 19
2
acts_as_ferret and Fuzzy Searching
Hi there, I''d like to be able to tune the results of a Fuzzy search in a rails application. I''ve tried setting the following in my environment.rb file. Ferret::Search::FuzzyQuery.default_min_similarity = 0.75 Ferret::Search::FuzzyQuery.default_prefix_length = 2 When I go into the console, I can see those values as the default but when I run a search like
2007 Jun 01
2
Is aaf multi_search broken?
Hi all, I want to use acts_as_ferret''s multi_search to search two model classes (Reviewable and Blog) at a time like @results = Reviewable.multi_search("jemen", [Blog]) and I''m always getting the error You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.map
2006 Nov 06
1
NameError uninitialized constant Ferret::Index::FieldInfos
Hi Everyone, I''ve a RoR application. I am trying to build full text search capability into it. I installed Ferret. After that I installed the act_as_ferret plugin. I''ve also put the acts_as_ferret inside the <model>.rb file . I''m using the find_by_contents to get the search results. I''m getting the following error. I''ve no clue and I
2007 May 25
1
how to update index with acts_as_ferret?
Hey all, I have movie has_many :medias and media belongs_to :media this is how my movie class looks like: class Movie < ActiveRecord::Base has_many :medias acts_as_ferret :fields => [:title,:medias_name] def medias_name return self.medias.inject("") {|name,m| name + " " + m.name} end end when I do Movie.find_by_contents("title:bob") it does return a movie
2006 Jul 10
2
acts_as_ferret 0.2.2
Hi all, I just tagged acts_as_ferret 0.2.2 as the current stable version, so get it while it''s hot ;-) new features: - added support for the multiple models/single index approach. - find out the total number of search results by calling total_hits on the array returned by find_by_contents. fixes: - trac tickets #20 (find_by_contents breaks ferret sorting) and #24