# How to use thinking sphinx

**URL:** <https://www.ruby-forum.com/t/how-to-use-thinking-sphinx/180523>\
**Category:** Rails\
**Created:** [December 21, 2009, 6:25am UTC](https://www.ruby-forum.com/t/how-to-use-thinking-sphinx/180523 "2009-12-21T06:25:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohitnegi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mohitnegi](https://www.ruby-forum.com/u/mohitnegi)\
**Post date:** [December 21, 2009, 6:25am UTC](https://www.ruby-forum.com/t/how-to-use-thinking-sphinx/180523/1 "2009-12-21T06:25:40Z")

</div>

I want to use thinking sphinx in my application, basically i have a  
filter criteria screen, and depending on the user input, the sql query  
is generated, which joins all the tables based on user input, now i want  
to use thinking sphinx for this query,  
my problem is how to pass sql query to thinking sphinx and then how to  
differentiate between fields which has same name but are from different  
tables(eg, id will be there in all the tables)

---

<div class="post-metadata">

**Author:** ![mohitnegi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mohitnegi](https://www.ruby-forum.com/u/mohitnegi)\
**Post date:** [December 21, 2009, 9:41am UTC](https://www.ruby-forum.com/t/how-to-use-thinking-sphinx/180523/2 "2009-12-21T09:41:55Z")

</div>

Check this out:

> **[\#120 Thinking Sphinx - RailsCasts](http://railscasts.com/episodes/120-thinking-sphinx)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

On 21 dic, 00:25, Mohit N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## I want to use thinking sphinx in my application, basically i have a filter criteria screen, and depending on the user input, the sql query is generated, which joins all the tables based on user input, now i want to use thinking sphinx for this query, my problem is how to pass sql query to thinking sphinx and then how to differentiate between fields which has same name but are from different tables(eg, id will be there in all the tables)
> 
> Posted viahttp://www.ruby-forum.com/.

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![mohitnegi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mohitnegi](https://www.ruby-forum.com/u/mohitnegi)\
**Post date:** [December 22, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/how-to-use-thinking-sphinx/180523/3 "2009-12-22T15:26:00Z")

</div>

Have a look at the thinking sphinx documentation.  
I believe field conditions might what you need.

[http://freelancing-god.github.com/ts/en/searching.html#conditions](http://freelancing-god.github.com/ts/en/searching.html#conditions)

Konstantinos

On Dec 21, 2009, at 7:25 AM, Mohit N. wrote:

> –
> 
> You received this message because you are subscribed to the Google G. “Ruby on Rails: Talk” group.  
> To post to this group, send email to removed\_email\_address@domain.invalid.  
> To unsubscribe from this group, send email to removed\_email\_address@domain.invalid.  
> For more options, visit this group at [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).
