Forum: Ruby on Rails DB design/query

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0f7716186bac5a8a2dc8007b70928c06?d=identicon&s=25 Luke Ivers (technodolt)
on 2007-01-12 21:10
I'm, once again, not 100% certain I should be posting this here and not
in the main Ruby forum, please tell me if I should be posting there

I'm designing a web-app that will contain a table with a couple of
identifying fields and about 15 'attribute' fields.  I'm then going to
allow the creation of 'data profiles'.  A user can create a data
profile, and they should get immediate returns on all current matching
(and matching isn't required to be 100%... as a matter of fact, the
chances of getting a 100% match should be fairly low) results, and the
profile will continue to live in the system, adding on new results, and
taking off ones that are invalidated as the data table is updated (new
items being entered, or old items being changed).

The only way I can think of to do this is to perform a full-on search
against each individual attribute in the data table, then compile a list
of items in the data table that match each profile, and to what
percentage they match.

That's going to scale into ridiculousness give any decent size for
either or both tables... but I have no idea how to do this any other

Anyone got any bright ideas?
91308e9bc88cb069fd1bcf88e910d042?d=identicon&s=25 Nick Snels (nicksnels)
on 2007-01-12 21:42
If you are planning on searching a lot through your data, I suggest you
take a look at a good search engine like Ferret or act_as_solr. Or even
Lucene or Solr if you have any Java experience. For example in Ferret
you could apply a boots, to make certain fields more important than
others and Ferret already gives a relevancy score. Doing a full-text
search in MySQL could give you scaling problems in the long run. Good

Kind regards,

Nick Snels
Compare and review Rails hosting
This topic is locked and can not be replied to.