similar to: A couple of ferret 0.9.4 exceptions

Displaying 20 results from an estimated 5000 matches similar to: "A couple of ferret 0.9.4 exceptions"

2006 Mar 01
9
Updating Index Is Very Slow
Hi, I am experiencing very poor performance when updating my index. For example, to update the index for 10 documents, it is taking 3 to 4 seconds. My index is currently very small... with probably less than 100 docs in it. I have created my index as follows: GIFT_INDEX = Index::Index.new(:path => "#{index_dir}/gift", :key => ''id'', :auto_flush => true)
2006 May 01
12
pagination in acts_as_ferret
I''m just wondering where I would put the pagination for search results when using "acts_as_ferret". At the moment my search code is.. def search @query = params[:query] || '''' unless @query.blank? @results = Tutorial.find_by_contents @query end end Cheers SchmakO -- Posted via http://www.ruby-forum.com/.
2006 Jun 29
13
find_by_contents not returning SearchResults?
The acts_as_ferret documentation says find_by_content returns an instance of SearchResults, but I see this error when I try to use the results. undefined method `total_hits'' for []:Array Here is the link to the documentation: http://projects.jkraemer.net/acts_as_ferret/rdoc/classes/FerretMixin/Acts/ARFerret/ClassMethods.html#M000010 But here is the actual code: result =
2006 May 30
3
Rebuild Indexes Issue
Hi, I have some code to rebuild my ferret indexes but occasionally some stale documents remain in the index even after rebuilding. The only way I could find around this is to manually delete the index files from the filesystem. Here is the code I have for rebuilding one of my indexes for Gifts: # delete existing entries INDEX.size.times {|i| INDEX.delete(i)} gifts =
2006 Apr 03
6
Installing Ferret locally on TextDrive
I would like to give the 0.9.0 version of Ferret a try on my application hosted on TextDrive. I am currently running on the 0.3.2 version there. Does anyone have any tips on installing it locally there? I know just enough about Ruby gems to get by... but I am thinking it could be as easy as passing a -i flag to specify the install location for ferret. Then, the only thing I am not sure about
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
2006 May 04
5
How to install Ferret to get the best performance
Hey all, After dabbling with ActiveSearch, we''re coming back around to take another look at Ferret. ActiveSearch slowed to a crawl after indexing about 20k documents, each 20 lines each. This time we may attempt to create multiple Ferret indexes (isolating each organization''s data individually), since we eventually could have upwards of 20k documents for some
2006 Jul 05
1
Routing via function
I have a route that depends on a username being passed in the URL, such as: map.connect '':username'', :controller => ''user'', :action => ''show'' Is there a way to perform a lookup of the username before matching on this route? I am hoping to be able to do something like this (completely made up): :requirements => {:username =>
2006 Nov 23
2
Segmentation Faults
Hi, I am using Ferret 0.9.4 and my index appears to be corrupt as any attempt to read or write it causes a segmentation fault. I had been using it with minimal problems for the past few months. Is there a way to fix this without rebuilding the entire index? Since I am on a shared host ferret takes too much memory to rebuild these roughly 8500 records in one go and in the past I have had to
2006 Aug 02
4
Linking to the paginated items from search results.
Using Ferret for searching, I''ve got results that I need to link to. Which is fine, except for that they''re displayed on paginated pages using Rails paginate function - so it''s not like I can''t get it from the database or anything else. Anyone have any ideas on how to go about this? It''s not so much a coding problem as a theory problem, and I
2006 Apr 26
3
catch all error for incorrect urls etc
Hi, I am changing a very standard old school website to rails. When I make the change to rails, all of the old urls will not be valid. If a person has a bookmark to an old web page I would like them to be directed to the front page of the new website www.domain.com. How do I do this? Do I do something in routes.rb? Thanks, Peter
2006 Nov 24
2
Strange error. Index corrupt on production server
We''ve been running Ferret for a few months on our site with great result. But, just a monent ago the index suddenly became corrupt. It all started with this error message: :108250 is out of range [0..108183] for IndexWriter#[] /usr/local/lib/ruby/gems/1.8/gems/ferret-0.10.9/lib/ferret/index.rb:382:in `[]'' And after that every search resulted in this error: A IOError
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id'' I have a Model class like the following: class Article < ActiveRecord::Base set_primary_key "ARTICLE_ID" end however, using a link_to like the following (modified scaffolding), the link has no id value: <% for article in @articles %> <tr> <% for column in
2006 Mar 17
4
using ajax and layouts
Hi. I copied the layout-example from agile web dev. in rails. When I want to use ajax to create a search field including <head><%= javascript_include_tag "prototype" %></head> does''nt work when I include the line in my app/views/layout/demo.rhtml. Name of controller is demo_controller.rb. The search-field is in app/views/demo/observer.rthml and I have to
2006 Mar 01
2
Sorting the Result
The document describes search(query, options) sort: An array of SortFields describing how to sort the results. I have created index with two fields: ''file'' and ''content'' When I give SortField name as ''file'' while searching, it results into error. The exact command given by me: index.search_each("sleepless AND dreams", :num_docs
2006 Jul 11
5
Ferret Wiki Spam - Solutions Anyone?
Hi All, As some of you may have noticed, the Ferret Wiki has been getting spammed like crazy. And I haven''t been able to do anything about it because I just don''t have the time. I''m getting pretty close to releasing 0.10.0 which has been the major draw on my time for the last couple of months so I''m going to have some time to look into this soon. I was
2006 Jan 27
3
Using ID as Key
Hi, I followed the howto to use keys for documents: http://ferret.davebalmain.com/trac/wiki/HowTos#Howtousekeysfordocument If I add two documents with the same id, only one gets added to the index as expected. However, I have found the key and id do not match. So, attempting to access the index with the id does not work. For instance, when I run this search: INDEX.search_each(query) do
2006 May 23
2
CSS not applied using apache
Hi all, I have recently configured rails to run under apache. I''ve tried adding a stylesheet using the stylesheet_link_tag function, however when I load the page I do not see the affects of the stylesheet. The URL to the stylesheet looks correct when viewing the page''s source. Has anyone else seen this problem? Thanks for your help, Chris -- Posted via
2006 Jul 31
2
Wizard-like multi-page transaction
Hello Is it possible to create something like wizard with database transactions, so transaction would begin on page one, then on page two, three... etc. there would be some data altered in the database and then on the last page the transaction would be committed or rolled back? thx Zvonko -- Posted via http://www.ruby-forum.com/.
2006 Mar 30
6
Global Method Declaration?
Is there a place where I can put a method that can be accessed in both views and controllers? Here''s the situation, maybe someone can suggest a better way to go about this: I created my own custom login system with email verification and user roles (basically, I tinkered around with SaltedHashLoginGenerator until I finally gave up and wrote my own). One role, of course, is an admin