# Using act\_as\_ferret with find\_by\_sql

**URL:** <https://www.ruby-forum.com/t/using-act-as-ferret-with-find-by-sql/87700>\
**Category:** Ferret\
**Created:** [March 5, 2007, 10:15am UTC](https://www.ruby-forum.com/t/using-act-as-ferret-with-find-by-sql/87700 "2007-03-05T10:15:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cubiq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@cubiq](https://www.ruby-forum.com/u/cubiq)\
**Post date:** [March 5, 2007, 10:15am UTC](https://www.ruby-forum.com/t/using-act-as-ferret-with-find-by-sql/87700/1 "2007-03-05T10:15:57Z")

</div>

Hello,

I wonder if its possible to combine ferret queries with find\_by\_sql  
queries?

Or should I try to rewrite my query using find and then use  
find\_by\_content when I’m done?

Thanks for a great product!

Regards,  
henrik

---

<div class="post-metadata">

**Author:** ![cubiq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@cubiq](https://www.ruby-forum.com/u/cubiq)\
**Post date:** [March 14, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/using-act-as-ferret-with-find-by-sql/87700/2 "2007-03-14T17:08:23Z")

</div>

Hi!

On Mon, Mar 05, 2007 at 10:14:41AM +0100, Henrik Z. wrote:

> Hello,
> 
> I wonder if its possible to combine ferret queries with find\_by\_sql  
> queries?
> 
> Or should I try to rewrite my query using find and then use  
> find\_by\_content when I’m done?

That’s one option. The other is to use find\_id\_by\_contents, collect the  
ids and use them in your find\_by\_sql statement.

cheers,  
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  
removed\_email\_address@domain.invalid | [www.webit.de](http://www.webit.de)

Amtsgericht Dresden | HRB 15422  
GF Sven Haubold, Hagen Malessa
