Displaying 11 results from an estimated 11 matches for "ferret_score".
2007 Sep 06
5
Find by contents and missing ferret_score method
Hi,
i m using acts as ferret via the find_by_contents, and then i my trying
to get the score of each results...
But the score of ferret_score method is missing...
I ve got the @total_hits in the array, but not the @score one :/
What s going on ?
Is this method disappear in acts_as_ferret ?
thanks
Guillaume.
--
Posted via http://www.ruby-forum.com/.
2007 Jun 04
5
Sorting and getting occurrences of search in hit
Is there any way you could get the number of occurrences of the search
in one hit?
In a result I get the ferret_rank and ferret_score but not how many hits
the search generated in the current record.
I would also like to be able to sort after this when I search.
/mattias
--
Posted via http://www.ruby-forum.com/.
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?
2007 Sep 21
3
multi_score?
Hi!
I''m using acts_as_ferret in my rails project and i need to order the
search results by a combination of the result given by ferret (score)
and a ranking in the database (normalized also). this combination can be
like that:
0.4*ferret_score+0.6*database_score
this database_score is also indexed
any idea?
and someone know how to access the ferret data in the object returned by
find_by_content in aaf?
thanks in advance!
Jos? Valim.
--
Posted via http://www.ruby-forum.com/.
2007 May 22
1
Bug in Ferret::Search::SortField::SCORE ??
...@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 results to be ordered by their ferret_score, even though i can
display that score just fine in my views. i''m really confused and
getting frustrated. maybe someone can shed some light on it. thanks!
here is a sample model :
acts_as_ferret :store_class_name => true, :fields => [:title, :body]
and the main view :
<%...
2007 Apr 22
0
rename error using rebuild_index in console after searching
...a search.
is this normal? I am using Ferret 0.10.9 in windows XP.
Loading development environment.
>> Address.rebuild_index
=> {}
>> Address.find_by_contents(''US'')
=> #<ActsAsFerret::SearchResults:0x4f2ffcc @total_hits=2,
@results=[#<Address:0x
4f30198 @ferret_score=0.106434106826782, @ferret_rank=1,
@attributes={"city"=>""
, "updated_at"=>"2007-04-16 01:32:40", "zipcode"=>"11111",
"addressable_type"=>"
User", "country"=>"US", "addressable_id...
2007 Mar 26
6
[AAF] acts_as_ferret 0.4.0 released
Hi folks!
Just wanted to let you know that I released aaf 0.4.0 on last weekend.
Besides the DRb server it also includes a new lazy loading feature that
lets you do ferret searches without actually loading any records from the
DB. Useful e.g. for live searches:
model:
class MyModel
acts_as_ferret :fields => { :title => { :store => :yes }, :content => {} }
end
controller:
2007 May 29
1
is "IN" a special word?
..._as_ferret :fields => {
:user => {:store => :no },
:len => {:store => :yes}
}
end
ruby script/console
>> User.find_by_contents(''Cal'')
=> #<ActsAsFerret::SearchResults:0xb762ab58 @total_hits=1,
@results=[#<User:0xb762b8f0 @ferret_score=0.244397431612015,
@ferret_rank=1, @attributes={"user"=>"Cal Poly", "id"=>"1",
"len"=>nil}>]>
>> u = User.new
=> #<User:0xb76293fc @new_record=true, @attributes={"user"=>nil,
"len"=>nil}>
>&...
2006 Nov 30
1
usage and benefits of single-index with AAF
The documentation states:
"single_index: set this to true to let this class use a Ferret index
that is shared by all classes having :single_index set to
true. :store_class_name is set to true implicitly, as well as
index_dir, so don?t bother setting these when using this option. the
shared index will be located in index/<RAILS_ENV>/shared ."
[1] If I''m reading
2006 Dec 07
5
Search Multiple Models
Hello folks,
I have four models, each with their own separate index.
Models = Articles, Blogs, MusicTracks, and MediaFiles
I have individual searches within each section of the site working just
fine, but I want to have a gloabl search that searches across all of
them at the same time and returns the results ordered by score.
Here''s how far I am now...
def search
query =
2007 Jul 03
4
problems with acts_as_ferret
Hi,
I have i am trying to add a search feature to a ruby on rails blog, so
ive decided to use ferret. So far i have had quite a few problems with
it, from following a few tutorials i didnt really understand... i am at
the point where i can make a search and it returns the score of the
result. I want it to also show the title of the post and i think i have
implemented it correctly but it