On Wed, May 16, 2007 at 08:55:46PM +0200, Alain Ravet wrote:
> Hi all,
> 
> Is there a way to have searches no use some indexed fields, when
> processing a query?
> 
> context:
> I have a model Foo that holds some information in two languages :
>   - text1_nl, text2_nl, text3_nl
> and
>   - text1_en, text2_en, text3_en
> Some other fields are common to both languages and indexed as well
>    - first_name, last_name
> 
> Depending on the visitor language choice I need to exclude the first
> three, or last three fields when query processing. Is this doable
> relatively simply?
> I guess I could use two indexes, but I'd like to keep using
> acts_as_ferret if possible.

A query string like

text1_nl|text2_nl|text3_nl|first_name|last_name:query

will only search for query in the named fields.

Jens

-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to