search for: rangequery

Displaying 10 results from an estimated 10 matches for "rangequery".

2007 Jul 18
1
How to use fixnum in RangeQuery?
As far as i know about the RangeQuery is that it need fixed-length number in query options such as RangeQuery.new(:count, :>= => ''00'', :<= => ''99''). But is there a mechanism to use a fixnum in the options instead of filling the left with 0? Regards. -- Posted via http://www.ruby-forum.c...
2007 Sep 07
4
Ferret DRB - can add/edit index, but can''t search
...DRB. Here are some example sorts and/or filters I''m using in my searches (not sure if this matters to Ferret DRB or not): Ferret::Search::SortField.new(:article_published_date, :reverse => true) Ferret::Search::Sort.new([Ferret::Search::SortField::SCORE, date_sort]) Ferret::Search::RangeQuery.new(:article_published_date, :>= => UserSystem::APP_DEFAULTS[:days_for_new].days.ago.utc.to_i.to_s, :<= => Time.now.utc.to_i.to_s) Ferret::Search::Sort.new([Ferret::Search::SortField.new(:article_published_date, :reverse => true)]) Any ideas why my searches wouldn''t be wo...
2006 Dec 07
1
Range Query Term parsing bug in 0.10.6 win32 ?
Hi, I think I''ve found a Range Query Term parsing bug ... the following term should return names >= ''A'', but instead generates a parsing error Term: name:[A> Message: Nil bounds for range. A range must include either lower bound or an upper bound However, the slightly larger term, name:[AA> works just fine. Any pointers please? Kind Regards Neville
2007 Jun 17
1
highlighting and range queries
...t; :yes, :index => :untokenized) i=1 for a in [ "20070505", "20071230", "20060920", "20081111" ] index << {:id => i, :test => a} i+=1 end for q in [ ''test:( >= 20070101)'', ''test:2007*'', Ferret::Search::RangeQuery.new(:test, :>= => "20070101") ] index.search_each(q) do |id, score| puts "Document #{index[id][:test]} found with a score of #{score}" highlights = index.highlight(q, id, :field => :test, :pre_tag => "\033[36m", :post_tag => "\033[m") pu...
2007 Mar 03
6
Problem with ferret :(
hi, i''m trying ferret and acts_as_ferret, it''s good, but i''ve a little problem. i''ve a model book which has a title and a quantity, how can i search using act_as_ferret all books which quantity is > 0 ? and howand with a search like "book", how can i found also title like "books" ? and the last, if i search "bok", is it possible
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 Jun 25
1
Sorting ferret results by column
I have the acts_as_ferret plugin installed. Everything searches great, but I would like to limit the results (i.e. by ''end_date'') and sort them (by ''end_date''). ''end_date'' is a valid column in my "posts" table. Here''s the code I have already: @posts = Post.find_by_contents(params[:query]) params[:query] comes from a form. I
2007 May 10
13
Is there a way to do incremental search?
Say the user first enters "ruby" for search and gets 1000 results. Then he can search "rails" just in the 1000 results just returned. The common scenario is some kind of advanced search. User can incrementally add criteria and the program will narrow the results step by step. I know that at least I can use all the criteria as a whole to do the searching, but this is a waste
2007 Jul 30
4
indexing only the changed values
Hi all, i have model A which has a field indexed from model B. model A belongs to model B. So whenever i insert a row in model ''A'', a query is fired to the field from model ''B'' even though the data was not changed for the field in model B. Can i somehow avoid these extra queries,or rather query the data and index it,only if the data has been changed>? e.g
2007 Aug 23
7
custom sort routine
is it possible to write a custom sort routine for ferret? I use ferret right now to index all my products. One of the variables in these product documents is the product popularity, where 1 = best selling production, 2 = 2nd best, etc.. Right now, I''m just sorting by the popularity column in my search results, although this doesn''t always provide "good" results,