search for: search_text

Displaying 9 results from an estimated 9 matches for "search_text".

2006 May 31
5
Help with sorting arrays with objects in it
I have to build an array through both activerecord and also through a ferret index. I was hoping to find a way of sorting the array as i combine the two so def advanced_search(search_text, store, format, sortby) # find items in ferret index items = Item.find_by_contents(search_text) # and now find all the items from a certain store or category items_from_sql = Item.find_by_sql("SELECT * .....") @list = [] items.each do |i| @list << i if items_from_sql.includ...
2007 Nov 09
2
Problem with stemming and AAF
...9;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 = Product.find_with_ferret(search_text, :page => params[:page], :per_page => #$ItemsPerPage, :limit => $ItemsPerPage, :offset => $offset) @results_pages = Product.paginate_search(search_text, :page => params[:page], :per_page => $ItemsPe...
2006 Jul 09
3
acts_as_ferret.. what does it actually do?
...#39;sale_type'',''outcode''] def VoObject.refine_search(search_input) bq = BooleanQuery.new bq.add_query(TermQuery.new(Term.new("section", search_input), BooleanClause::Occur::Should)) filter = QueryFilter.new(bq) @vobjects = Item.find_by_contents(search_text,:filter => filter, :sort => ["section", "sale_category"]) redirect_to :results end ############ I get this ############## ruby script/console Loading development environment. >> VoObject.refine_search(''housing'') NameError: uninitialized con...
2007 Apr 06
4
Newbie having full text search problem with acts_as_ferret
Hi guys, I am using acts_as_ferret to do full text search on my models and I am having problem on three-letter word searches. I am going to use an example to explain my problem. Here it is: There is a table called users and it has login, first_name, last_name columns. There are three rows inside it. login first_name last_name bob bob henry longbob nil
2006 Jul 28
8
Building a Search Page as part of CRUD
I''ve been experimenting with Rails over the past couple of days and have come across something that seems harder than it should be. In previous frameworks I have used (WebObjects, php) a full search page (which leads into a list view populated with search results) was part of the CRUD that was either dynamically or statically created after specifying table/object schema. In
2006 Apr 07
1
Help... Ajax scaffold problems
...m to do is get the div to update or change without the request coming from a link--when the code which should cause the update is coming from the controller. I''m trying to have requests go to the master controller, and cause the components to update. Data entry page: <%=observe_field :search_text,:frequency =>1,:with => "''search_text='' + escape(value)",:update=>:results,:url=>{:action =>:search }%> <%= render_component :controller => ''mails'', :action => ''list'' %> <%= render_component :controlle...
2006 Jul 30
8
Method_missing from Ruby for Rails book
I''m having a problem getting this example from the book to work: class Cookbook attr_accessor :title, :author def initialize @recipes = [] end def method_missing(m, *args, &block) @recipes.send(m, *args, &block) end end cb = Cookbook.new cb << recipe_for_cake cb << recipe_for_chicken beef_dishes = cb.find_all {|recipes| recipe.main_ingredient ==
2006 Aug 25
4
using conditions
Hello guys, I''m pretty new to using AAF and am having a slight problem with using a condition. I have the following code @results = SupplierProduct.find_by_contents(params[:search], :conditions => [''area_id = ?'', @area]) and it seems the condition isn''t being applied. Does anyone have any pointers? Cheers, Alastair -- Posted via
2009 Sep 15
1
Powered by Xapian
Hi, I'm not so far, by now, of publicly releasing the next version of our web site which is extensively using Xapian, so I thought it was time to say "thank you" by adding in the footer and in the "credits" page of my site the Xapian logo with a link back to the Xapian web site. I was surprised to discover how hard it was for me to find how to do... I'm not a