Displaying 20 results from an estimated 600 matches similar to: "Recalculating the score"
2007 Sep 07
4
Ferret DRB - can add/edit index, but can''t search
I''m trying to use the Ferret DRB server to avoid concurrency issues when
using multiple mongrels. I can successfully add and edit data on my
index via the DRB server, however, when I search the index, I get the
following error:
DRb::DRbConnError (DRb::DRbServerNotFound):
/usr/lib/ruby/1.8/drb/drb.rb:1647:in `current_server''
/usr/lib/ruby/1.8/drb/drb.rb:1709:in
2005 Dec 16
5
Ordering results by something other than relevance
Along with the contents of the documents in my index, I have stored
the date they were added. I want to search for keywords in the index
but have the results be sorted by their date rather than their
relevance to the keywords. How would I do this in ferret?
Thanks,
Carl
2006 Oct 16
10
Sorting by score
Hi I think this is a very easy question but here goes:
I want to sort my results by a boolean field and then by score, I
thought this would be a default configuration but apparently not.
sort_fields = []
sort_fields << Ferret::Search::SortField.new(:sponsored, :reverse =>
:true)
that is my current code, how do iu alter it so that the results are then
sorted by highest score first?
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
2008 Mar 01
3
Possible bug when creating a Ferret::Search::Sort object?
I may have run across a bug in Ferret: if throws a segmentation fault
when I try to create a Sort object using the default fields (SCORE and
DOC_ID), but setting reverse to true.
Here''s the minimal example:
#!/usr/bin/env ruby
require ''rubygems''
require ''ferret''
Ferret::Search::Sort.new
Ferret::Search::Sort.new(
[
2006 Dec 28
13
Sorting/Ordering Search Results
Hello All,
I am having an issue with AAF and sorting results of a search. Right
now, I have results being split onto pages of 10. The results are being
sorted alphabetically, but not across multiple pages - it''s just sorting
the 10 it pulls down on each page. I noticed another post from April
regarding this same issue (http://www.ruby-forum.com/topic/62993#66934)
where the issue was
2006 Jul 12
5
Reverse sorting
I am getting strange results when I reverse sort a query. I am sorting
by date, but it doesn''t seem to be related to dates (I have tried just
integers). I also paginate the results. Items in the result set are
sometimes duplicated and the not ordered at all. When I try a
non-reverse sort I don''t see duplicates and the ordering is correct. Any
ideas what is going on? Thanks
2006 May 05
3
Sorting by score
I''m trying to sort by score but it seems like SortField::SortType::SCORE
is 0 instead of a SortType. A test case is attached. Without the C
extensions the test passes, so I guess it''s a bug in them. Should I be
using it without the extensions? Because if that''s the case I have some
other bugs to report.
Greetings,
Pedro C?rte-Real
-------------- next part
2006 Aug 30
7
AAF Sorting by date - what am I doing wrong?
I''m trying to sort my search results by Date, in descending order. I''ve
done quite a bit of reading through the forums here, and I''ve tried two
different suggestions.
This just returns results in the same order as a search without a sort:
sort_fields = []
sort_fields <<
Ferret::Search::SortField.new("ferret_created_at",:reverse => :true)
2007 Jul 13
8
More sorting problems with untokenized index
I''m having problems sorting on untokenized fields. I have one field that
sorts fine, but there are others that seem to sort on a different field.
Here''s the index description:
acts_as_ferret
:remote=>true,:fields=>{:name=>{:boost=>2},:name_for_sort=>{:index =>
:untokenized},
:city=>{:boost=>2}, :city_for_sort=>{:index=>:untokenized},
2007 Mar 31
3
Sorting issues, can anyone help me?
I have this model:
class Post < ActiveRecord::Base
acts_as_ferret :fields => { :title => {:boost => 2},
:description => {},
:url => {},
:rank_sort => {:index =>
:untokenized_omit_norms, :term_vector => :no},
2006 Oct 02
4
Another web app using Ferret
I am apart of a team that runs a student site called Studicious
(http://stu.dicio.us). We have been using Ferret from the beginning, and
recently added acts_as_ferret and sorting to the system.
As you can see if you try the search, sorting is not working as
expected. I am using this code (w/ find_by_content):
:sort => Ferret::Search::SortField.new(:school_sort, :reverse => false)
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 =
2007 Apr 01
2
strange behavior after switching to DRb server
After switching to the DRb server, I am experiencing strange behavior
when sorting on score. My app was working as expected before the switch.
Both before and after the switch, my app sorts properly on other
fields, such as date.
For sorting on score, I am using the following option
find_by_contents option:
:sort => Ferret::Search::SortField::SCORE
Before switching to DRb, this worked
2006 Aug 20
1
sorting with booleans
Hi i have a column in my ferret model called sponsored. It is a boolean
and i want to order the results by sponsored and date registered. At the
moment it is not managing to sort the booleans.
I tried declaring this in my model but it seems to have had no effect.
def false.<=>(o) o ? -1 : 0 end
def true.<=>(o) !o ? 1 : 0 end
I''m using the acts_as_ferret plugin.
below
2007 Apr 01
7
baffling sort problem
I had sort-by-date working almost perfectly with my app. It was
behaving as expected for most data, but had a few hiccups with
certain data. I investigated and discovered that the correct data was
storing this in my ferret index: "1999-10-18 00:00:00" and the
incorrect data was storing this: "Mon Oct 18 00:00:00 EDT
1999" (oops...)
So I of course had to fix the
2007 May 22
1
Bug in Ferret::Search::SortField::SCORE ??
i have been trying to get this to work for a while now. my controller
is
sort = [ Ferret::Search::SortField::SCORE_REV ]
@results = Record.multi_search(params[:search_terms], [ Link, Post,
Event ], {:limit => :all, :sort => sort })
and in my view i just render a conglomeration of the appropriate
partials for each model. it seems that no matter what i do, i can''t get
the
2006 May 09
1
Reverse sorts by score
The docs for Sort.new say:
reverse: pass true if you want the sort order to be reversed. Only works
if you pass the field names.
Does this mean it''s not possible to do a reverse sort by score? If it is
it seems to be broken as I don''t seem to be able to reverse the order of
the sort. I''ll write a test case if this is not a known problem.
Greetings,
Pedro.
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
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/.