Hi Does acts_as_ferret support a :group clause? For e.g any rails options like :select or :group etc? or is it that it supports only few of such options?Like it supports :include Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20070731/a74fb666/attachment.html
On Tue, Jul 31, 2007 at 02:12:23AM -0700, isha kakodkar wrote:> Hi > Does acts_as_ferret support a :group clause? > For e.g any rails options like :select or :group etc? or is it that it > supports only few of such options?Like it supports :includeyou can put whatever AR options you like into the second argument hash of find_by_contents. 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
ok...and how do i achieve find_id_by_contents search with where condition but support of "or" and "and"? when i search a query string and provide Messages.full_text_search("searching, user_id:#{user_id} name:#{name}", {:page =>(params[:page]||1), :sort => s}) It searches for all ids where user_id is the given value and name is the given value. But if i want to achieve a "or" between the 2 conditions how do i do it? On 7/31/07, Jens Kraemer <kraemer at webit.de> wrote:> > On Tue, Jul 31, 2007 at 02:12:23AM -0700, isha kakodkar wrote: > > Hi > > Does acts_as_ferret support a :group clause? > > For e.g any rails options like :select or :group etc? or is it that it > > supports only few of such options?Like it supports :include > > you can put whatever AR options you like into the second argument hash > of find_by_contents. > > 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 > kraemer at webit.de | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold, Hagen Malessa > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20070803/1f8db6fb/attachment.html
On Fri, Aug 03, 2007 at 06:48:46AM -0700, isha kakodkar wrote:> ok...and how do i achieve find_id_by_contents search with where condition > but support of "or" and "and"? > > when i search a query string and provide > Messages.full_text_search("searching, user_id:#{user_id} name:#{name}", > {:page =>(params[:page]||1), :sort => s}) > It searches for all ids where user_id is the given value and name is the > given value. > But if i want to achieve a "or" between the 2 conditions how do i do it?By specifying ''OR'' between them in your query :-) You can also change the default behaviour to OR queries with the :or_default Ferret configuration variable. 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
I tried it and dint get the resultset..But i messed up something i guess..Thanks. I had something more to it also... Which all sql conditions i can specify with find_id_by_contents?OR,AND... what about ''IN'' clause? Or do i have to do that with find_by_contents when the sql is getting fired... On 8/3/07, Jens Kraemer <kraemer at webit.de> wrote:> > On Fri, Aug 03, 2007 at 06:48:46AM -0700, isha kakodkar wrote: > > ok...and how do i achieve find_id_by_contents search with where > condition > > but support of "or" and "and"? > > > > when i search a query string and provide > > Messages.full_text_search("searching, user_id:#{user_id} name:#{name}", > > {:page =>(params[:page]||1), :sort => s}) > > It searches for all ids where user_id is the given value and name is the > > given value. > > But if i want to achieve a "or" between the 2 conditions how do i do > it? > > By specifying ''OR'' between them in your query :-) > > You can also change the default behaviour to OR queries with the > :or_default Ferret configuration variable. > > 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 > kraemer at webit.de | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold, Hagen Malessa > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20070803/236850c5/attachment.html
hi, while providing conditions during index file search,do i have to give the exact value?or can i specify condition like "id>4"...i tried but couldnt get it working....Can you please help..? On 8/3/07, isha kakodkar <isha.kakodkar at gmail.com> wrote:> > I tried it and dint get the resultset..But i messed up something i > guess..Thanks. > I had something more to it also... > Which all sql conditions i can specify with find_id_by_contents?OR,AND... > what about ''IN'' clause? > Or do i have to do that with find_by_contents when the sql is getting > fired... > > On 8/3/07, Jens Kraemer <kraemer at webit.de > wrote: > > > > On Fri, Aug 03, 2007 at 06:48:46AM -0700, isha kakodkar wrote: > > > ok...and how do i achieve find_id_by_contents search with where > > condition > > > but support of "or" and "and"? > > > > > > when i search a query string and provide > > > Messages.full_text_search("searching, user_id:#{user_id} > > name:#{name}", > > > {:page =>(params[:page]||1), :sort => s}) > > > It searches for all ids where user_id is the given value and name is > > the > > > given value. > > > But if i want to achieve a "or" between the 2 conditions how do i do > > it? > > > > By specifying ''OR'' between them in your query :-) > > > > You can also change the default behaviour to OR queries with the > > :or_default Ferret configuration variable. > > > > 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 > > kraemer at webit.de | www.webit.de > > > > Amtsgericht Dresden | HRB 15422 > > GF Sven Haubold, Hagen Malessa > > _______________________________________________ > > Ferret-talk mailing list > > Ferret-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ferret-talk > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20070808/97011969/attachment-0001.html