similar to: Adding entry breaks index

Displaying 20 results from an estimated 400 matches similar to: "Adding entry breaks index"

2007 May 30
4
aaf and dynamic attrs: a bug?
Hi! I faced some issue while using it for dynamic attrs indexing/search. Maybe I made something wrong. Here is test method. Everything works just fine until last line http://pastie.caboo.se/66274 . Tested on both stable and trunk of aaf and ferret 0.11.4. the short version of code below: Contact.acts_as_ferret :fields => [ :first_name ] assert
2007 Apr 30
1
Can''t search fields with space
Hi, I have a user model that has a city field which is searchable using acts_as_ferret. But I can''t get it to return any result whether I use :city => {:store => :no, :index => :untokenized}, or :city => {:store => :no} in my User model''s acts_as_ferret option >>> User.find_by_contents("city:(cal poly)") =>
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 Oct 10
5
oddness when adding to index -
I was having some odd results when working with acts_as_ferret (current trunk), so I decided to test with the current version of ferret to see if I encountered the same problem. I did. Here are the details: installed ferret 0.10.10 on debian sarge with ''sudo gem install ferret'' (btw, same results on OSX) opened up an irb session: irb(main):001:0> require
2007 Sep 05
1
AAF and DRb with highlighting
How would I change this method in order to get highlighting working with DRb? I''ve given up on searching on Google, I''m getting no results that are actually helpful. def self.find_storage_by_contents(query, options = {}) # Get the index that acts_as_ferret created for us index = self.aaf_index.ferret_index results = [] default_options = {:limit => 10,
2007 Jan 13
5
Problems using acts_as_ferret
Hi all, I''m trying to use acts_as_ferret and have run into a brick wall. My model is Page My controller is Pages_controller. When in console, I can search for contents, and find results. For example, when I search for "spam" it "finds" 7 results. => #<FerretMixin::Acts::ARFerret::SearchResults:0x2693934 @total_hits=7, @results=[]> you can do a
2007 May 03
1
Numeric Range or comparision doesn''t work
Hi, it looks like Ferret still compares numeric fields by lexical ordering, not numerical ordering. I am using Ferret 0.11.4(I tried in both linux and windows, the results are the same). index = Ferret::Index::Index.new() docs = [ {:num => 1, :data => "yes"}, {:num => 1, :data => "no"}, {:num => 10, :data => "yes"}, {:num => 10, :data
2007 May 16
7
return ONLY total_hits without querying from real database
Hey guys, I know I can run search(q).total_hits, but if I try to put :limit=>0 it gives me an error. I don''t want it actually query any of the results, I just want it to tell me how many total_hits I would have if I wanted to search it. How can I do this? -- Posted via http://www.ruby-forum.com/.
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 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] ==
2007 Dec 02
1
total_hits and conditions
Hi. I''m running 0.11.4. The problem I''m having, appears to have been solved before according to various posts I googled up, but possibly the fix got removed from 0.11.3 to 0.11.4? re = Entry.multi_search(''service'', [Ticket], options, {}) re.size 620 re.total_hits 620 Now add conditions: re = Entry.multi_search(''service'', [Ticket],
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 Jul 03
4
problems with acts_as_ferret
Hi, I have i am trying to add a search feature to a ruby on rails blog, so ive decided to use ferret. So far i have had quite a few problems with it, from following a few tutorials i didnt really understand... i am at the point where i can make a search and it returns the score of the result. I want it to also show the title of the post and i think i have implemented it correctly but it
2003 Feb 19
4
newbie wants to compile SCP into his own application
Hi all, I have seen in the OpenSSH source that the scp executable is built by compiling scp.c and linking with libopenbsd-compat.a and libssh.a. (Correct me here if I'm wrong) My question is, can I make this a module in my own application by using the scp.c source and ilnking the libraries mentioned above ? The reason is, I want to perform an SCP from my application, but I don't want to
2006 Sep 20
3
Range searches some times they work, some times not...
Hi i''m using ferret to enable geographical postcode. I take a postcode and distance in miles from the user, strip off the outcode and then retrieve the associated x y coordinates in metres from the db. Then i get two temp x''s and y''s and search for all results that are within the box, see code below. Problems start to occur when i search on big distances so for
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
2007 Jul 04
2
problems after gem update
Hi, I had ferret working wonderfully but i am regretting doing a gem update today. I had alot of trouble first installing it and was really happy to have it working. The upgrade was from 0.3.1 to 0.4.0. The problem is; in the rails console, >> @results = Book.find_by_contents("peter pan") => #<ActsAsFerret::SearchResults:0x487040c @total_hits=0, @results=[]> Its indexing
2008 Jan 09
5
Parallel indexing doesn''t work?
Hi, I''m trying to get parallelized ferret indexing working for my AAF indices, based on the example in the O''Reilly Ferret shortcut. However, the resulting indices after merging seem to have no actual documents. I went and made minimal changes to the example in the Ferret shortcut pdf, and indeed can''t get that to work either. I''d appreciate any help
2007 Jul 23
1
AAF association not workin
Hi, I have configured my model as follows: class Product < ActiveRecord::Base acts_as_ferret :fields => [:description,:label_description,:label_free,:product_id_supplier,:description_supplier,:supplier_description] belongs_to :supplier def supplier_description return "#{self.supplier.description}" end In the development log I can see the supplier_description
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 ]