search for: to_tsquery

Displaying 3 results from an estimated 3 matches for "to_tsquery".

Did you mean: to_query
2006 Feb 23
0
Searching within active record results - ror n00b
...to be able to narrow searchs and then allow for text searches using tsearch2 and postgres. @format = Format.find(@params[:format_id]) @items = @format.items And then do a find_by_sql on the @items, but I know this isnt how you do this. @items.find_by_sql("SELECT * FROM items WHERE idxfti @@ to_tsquery(''default'', ''#{@str}'') class Format < ActiveRecord::Base has_and_belongs_to_many :items belongs_to :parent, :class_name => "Category", :foreign_key => "parent_id" has_many :childre...
2006 Oct 23
1
Postgres and Tsearch2, how do you do it?
Hi, How do you use Tsearch2 in Rails? Petr -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to
2008 Nov 27
0
Rails Join problem
...tude and longitude. So my Article object has three fields: id name user_id (FK to User model) And my user model has four fields id name lat (latitude) lng (longitude) OK, to have access to the user info thru articles i do the query: @articles = Article.find(:all,:conditions=>"vectors @@ to_tsquery (''büch'')",:joins=>" INNER JOIN users ON users.id = articles.user_id",:include=>:user,:origin=>"Augustusplatz, 8,leipzig,germany") it works. But when i wanna add an :order=>''distance ASC'' it fails because the order by query is...