Displaying 20 results from an estimated 3000 matches similar to: "Searches limited to 10 results?"
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)
2006 Aug 06
5
Return only results that user is allowed to see?
Is it possible with acts_as_ferret to somehow restrict the results that
are returned?
For instance, I don''t want to return results that are logically deleted
with acts_as_paranoid (deleted_at IS NOT NULL and deleted_at < now()).
Also, if a user is not an Admin, they should not be able to return
results that have a certain value in a certain column, like forum_id !=
13 (if 13 is
2006 May 01
12
pagination in acts_as_ferret
I''m just wondering where I would put the pagination for search results
when using "acts_as_ferret".
At the moment my search code is..
def search
@query = params[:query] || ''''
unless @query.blank?
@results = Tutorial.find_by_contents @query
end
end
Cheers
SchmakO
--
Posted via http://www.ruby-forum.com/.
2006 Jul 19
4
sorting and pagination
Hello All,
Okay i think I''m finally getting all of what i want out of ferret
working, thanks mostly to reading this forum and also getting ALOT of
questions answered, thanks alot everyone. Anyway my last ferret task 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:
2006 Aug 28
1
strange 10 limit
Hi,
I have a max_results limit of 10, whatever value I pass to max_results,
even if I drop this option in my class.
Same limit using script/console
Myclass.find_by_contents(query)
Ideas ?
Using aaf 9.5.
Jean-Christophe Michel
--
symetrie.com
Better Nested Set for rails:
http://opensource.symetrie.com/trac/better_nested_set
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
2006 Jul 06
5
acts_as_ferret Locale issue
I''ve just installed acts_as_ferret, and am trying to build my index, but
I''m getting the following error:
>> r = Topic.find_by_contents(''testing'')
StandardError: : Error occured at <analysis.c>:704
Error: exception 2 not handled: Error decoding input string. Check that
you have the locale set correctly
from
2007 Jan 15
3
Wrong total_hits when using conditions in find_by_contents
I don''t know if this is a bug, or wanted behavior, but for me it was a
pain in... So here''s the problem + a bugfix.
Lets say you have a model "Article" with the following fields: title,
visible - and these records
[code]title, visible
ferret talk, 1
ruby talk, 0
ruby on rails, 1
lets talk about ruby, 1[/code]
If I let Article act as a ferret, and do:
result =
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 =
2006 May 17
8
How to implement full-text search with OR just like google?
The current full-text search will return the AND collection results,for
example,if we use Article.search("aa bb"),then the articles that include
"aa" and "bb" in the fields will be returned,how to return the articles
that include "aa" OR "bb" effectly? A stumb method is to setup two
queries respectly and collect them together with remove the
2007 May 30
4
aaf and dynamic attrs: a bug?
Hi!
I faced some issue while using it for dynamic attrs indexing/search.
Maybe I made something wrong. Here is test method. Everything works just
fine until last line http://pastie.caboo.se/66274 . Tested on both
stable and trunk of aaf and ferret 0.11.4.
the short version of code below:
Contact.acts_as_ferret :fields => [ :first_name ]
assert
2005 Dec 02
43
ANN: acts_as_ferret
Hi all
This week I have worked with Rails and Ferret to test Ferrets (and Lucenes)
capabilities. I decided to make a mixin for ActiveRecord as it seemed the
simplest possible solution and I ended up making this into a plugin.
For more info on Ferret see:
http://ferret.davebalmain.com/trac/
The plugin is functional but could easily be refined. Anyway I want to share it
with you. Regard it as a
2005 Dec 02
43
ANN: acts_as_ferret
Hi all
This week I have worked with Rails and Ferret to test Ferrets (and Lucenes)
capabilities. I decided to make a mixin for ActiveRecord as it seemed the
simplest possible solution and I ended up making this into a plugin.
For more info on Ferret see:
http://ferret.davebalmain.com/trac/
The plugin is functional but could easily be refined. Anyway I want to share it
with you. Regard it as a
2006 Aug 25
7
acts_as_ferret with conditions
Hello guys,
Having a slight problem with acts_as_ferret, specifically 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
------
Alastair Moore
Standards compliant web
2007 Feb 25
9
Ferret 0.11.0-rc1
Hey folks,
Sorry for cross posting like this but this is an important
announcement for all Ferret users.
** Description **
Firstly for those who don''t know, Ferret is a full-text search library
which makes adding search to your application a breeze. It''s much
faster than MySQL full-text search as well most other search libraries
out there. It allows you to do Boolean (+ruby +
2006 Oct 16
8
acts_as_ferret: can i specify a search on 1 field as suppose
to the ones i defined in my model? for example if in the model i specify
acts_as_ferret to index only column 1, 2, and 3 in my table....how can i
perform a search just for column 1 if need be.
for example, id like to give the user the ability to just search on
title name vs description, etc...
thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Sep 19
2
acts_as_ferret and Fuzzy Searching
Hi there,
I''d like to be able to tune the results of a Fuzzy search in a rails
application. I''ve tried setting the following in my environment.rb file.
Ferret::Search::FuzzyQuery.default_min_similarity = 0.75
Ferret::Search::FuzzyQuery.default_prefix_length = 2
When I go into the console, I can see those values as the default
but when I run a search like
2007 Oct 03
3
Pagination problem with acts_as_ferret
Hi,
am using this wonderful plugin acts_as_ferret and according to the
tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic
I worked it out except the pagination feature.
If I have 12 records and I give limit to 10, its correctly displaying 10
records in the first page and is giving the link to the second page too.
But when I go to the next page I find the same 10 records instead of
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
2007 Jun 01
2
Is aaf multi_search broken?
Hi all,
I want to use acts_as_ferret''s multi_search to search two model classes
(Reviewable and Blog) at a time like
@results = Reviewable.multi_search("jemen", [Blog])
and I''m always getting the error
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.map