If it's just a simple search, but you want to check all of the
columns:
query = SomeClass.all.query
SomeClass.properties.each {|p|
query.update(p[:name].like => "%search string%")
}
There is an easier way to do that, but I can't think of it atm...
If it's more complicated than just a simple search across several
fields, then yea, use sphinx or something.
On Mar 20, 4:28 pm, bertly_the_coder <[email protected]> wrote:
> Hi,
>
> I want to use DM to create a search algorithm. The algorithm basically
> searches for a word in any of all the entries columns. If the world is
> found, the entry is returned. Is their a way to do this with DM or do
> I have to write a custom SQL query?
>
> Thanks
> Bertly.
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.