Yes, easier and faster. The one case where it might get tricky is if for the same model you want to search over a different set of columns in different cases. It's probably doable, but sphinx is super-easy when you're always searching across the same columns for a particular model (and as Pat says, easy even if you're joining to other related tables).
bp On Dec 11, 4:14 pm, Pat Allan <[email protected]> wrote: > This is definitely much easier in Sphinx... if you're using Thinking Sphinx, > you could do that query something like: > > Registration.search 'query' > > This will match the given words across all indexed fields - as long as those > words exist in any of the fields somewhere (not all in the same field, not > all together - though you can do that with conditions or phrase matching > respectively if you'd like). > > If you want wildcard matching, you will need to enable it, but then the > searching can be done either one of these ways: > > Registration.search 'query*' > # Or, if you want to add *'s before and after each word: > Registration.search 'query', :star => true > > Wildcard settings information is in the > docs:http://freelancing-god.github.com/ts/en/common_issues.html#wildcards > > This is definitely faster and more flexible with large datasets than MySQL. > > -- > Pat > > On 12/12/2009, at 9:15 AM, UserNumber42 wrote: > > > > > I am developing a search feature for a system that has around 200,000+ > > plus rows of data that needs to be searched. The data is sales and > > registrations data so the search will be over multiple fields and over > > multiple tables. Since the data between the tables is separate, the > > search needs to do something like this: > > > (`registrations`.`licensee` LIKE 'query%') OR > > (`registrations`.`organization` LIKE 'query%') OR > > (`registrations`.`address` LIKE 'query%') OR > > (`registrations`.`city` LIKE 'query%') etc... > > > on the registrations table and sales table. > > > My question is if Sphinx is right for this? I have read a lot about it > > but I can't find much information on if it relates to my problem. I > > know it's a full text search replacer, but will it be better than > > MySQL when it has to search over dozens of fields? > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Thinking Sphinx" 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 > > athttp://groups.google.com/group/thinking-sphinx?hl=en. -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" 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/thinking-sphinx?hl=en.
