search for: voobject

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

2006 Jul 09
3
acts_as_ferret.. what does it actually do?
...out there knows what th eproblem is then please get in touch, also does anyone use acts_as_ferret successfully in an application doing more than just using find_by_contents? Thnaks in advance for any replies/help cheers caspar #####extract from model require ''ferret'' class VoObject < ActiveRecord::Base acts_as_ferret :fields=> [''short_description'',''section'',''sale_category'',''sale_type'',''outcode''] def VoObject.refine_search(search_input) bq = BooleanQuery.new bq.add_que...
2006 Jul 19
4
sorting and pagination
...is too get the results sorted by a field called date_registered and have this working with pagination. here is what i''m doing at the moment: ################################ acts_as_ferret :fields=> [''short_description'',...,''date_registered''] def VoObject.find_results(query,page) sort_fields = [] sort_fields << Ferret::Search::SortField.new("date_registered", :reverse => :false) results2 = VoObject.find_by_contents(query,:num_docs=> 2000000,:sort =>sort_fields ) num = results2.size if page == 1 page = 0 else...
2006 Jul 14
3
Whitespace Issues
...ered 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 => ["section", "sale_category"]) This works fine when the "section" is a single word like "book" but when there is white spaces in the query like "paperback book" it does not find the...
2006 Sep 20
3
Range searches some times they work, some times not...
...tcode 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 example 40 miles from "G1" VoObject.ferret_index.search(" x:[206826 335573] AND y:[590526 719273]").total_hits => 165 300 miles VoObject.ferret_index.search("y:[172098 1137702]").total_hits Ferret::QueryParser::QueryParseException: Error occured in q_range.c:121 - range_new Upper bound must be great...
2006 Aug 20
1
sorting with booleans
...acts_as_ferret plugin. below is the relevent code that i''m currently using. sort_fields = [] sort_fields << Ferret::Search::SortField.new("sponsorerd") sort_fields << Ferret::Search::SortField.new("ferret_date_registered", :reverse => :true) results = VoObject.find_by_contents(query,:first_doc=>page, :num_docs=> 20,:sort =>sort_fields) Thanks in advance for any replies. regards c -- Posted via http://www.ruby-forum.com/.
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 in each result set. So in the animals fields there can...
2006 Sep 05
15
ferret finds ''tests'' but not ''test''
Hello all, Quick question (possibly!) - I''ve got a few records indexed and doing a search for ''test'' reports in no hits even though I know the word ''tests'' exists in the indexed field. Doing a search for ''tests'' produces a result. I would have thought that ''test'' would match ''tests'' but no such
2006 Oct 31
5
conditional boost? friends to come up at top of search...
Hey guys, im trying to get my friends to come up at the top of the act as ferret search. I would query the whole result set first, then move my friends to the top, but the thing is, Im paginating my results and use the offset and limit parameters in the multi_search() function. Anyone know how to do this? Thanks in advance... -- Posted via http://www.ruby-forum.com/.