Hi i could use a find(:all, :conditions => blah) but my browse page is 
divited into types and categories and so i was using a wildcard search 
with find_by_contents and then one or two filters depending on whether 
the user selects a type or a type and category. I just thought that 
ferret would be faster than a find all with conditions,(also im already 
using it on my search page and the browse page has similar 
functionality).  Is this not so? The conditions would be an exact match 
on the full contents of a db cell. Would ferret still be faster with 
this?
So what i basically want to do is a simple search on one or two fields. 
How is this done with acts as ferret? How do you specify what fields out 
of the index to search on?
Thanks for an advice
regards
Clare








Jens Kraemer wrote:
> On Tue, Aug 29, 2006 at 02:06:16AM +0200, Clare wrote:
>> Hi after upgrading to ferret 0.10.1 and bleeding edge aaf i'm getting 
>> some strange behavior. Generally much better stability with new version 
>> of ferret but when i add new items for some reason i can no longer 
>> search with a *. Or rather i can but it returns no results and no 
>> errors. I can search and get results normally on other searches and when 
>> i rebuild the index i can search with * until i add a new item. Has 
>> anyone else experienced this? I use * in my browse items page.
> 
> do you mean a query only consisting of '*' or wild card queries like
> 'test*' ? The former isn't an allowed query, afaik. Don't know why it
> works before modifying the index. Here's the snippet how I reproduced
> this behavior:
> 
> require 'rubygems'
> require 'ferret'
> include Ferret
> i = I.new
> i << 'just some testing'
> i.search('*').total_hits          # => 1
> i << 'another testing session'
> i.search('*').total_hits          # => 0
> 
> 
> why don't you just use find(:all) on your browse page ?
> 
> Jens
> --
> webit! Gesellschaft f�r neue Medien mbH          www.webit.de
> Dipl.-Wirtschaftsingenieur Jens Kr�mer       [EMAIL PROTECTED]
> Schnorrstra�e 76                         Tel +49 351 46766  0
> D-01069 Dresden                          Fax +49 351 46766 66


-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to