Gossamer Forum
Home : Products : DBMan : Customization :

Matching multiple fields

Quote Reply
Matching multiple fields
I am trying to use DBMAN to do and 'and' search. In other words, I would like the user to be able to select multiple search terms that could match a certain field then return those results in order from most matches to least.

For example, suppose the database were a list of cars, which contained make, model, year, and a list of available features. The user could select any number of features (6 cylinder engine, bucket seats, cd player etc) and the list of available cars would be returned, with the ones that had the most number of matching features listed first, second most next etc.

How can this be accomplished? Also, can I have a field 'options' that has many valid values or do I have to give each option it's own field then give it a value of yes or no in order to do the search.

Thanks for your help and advice!
Quote Reply
Re: Matching multiple fields In reply to
In terms of your first request, what you are really asking for (I think) is a relevancy search based on the percentage of keywords matched for records. This is a great idea, but unfortunately not available at this time.

Quote:
Also, can I have a field 'options' that has many valid values or do I have to give each option it's own field then give it a value of yes or no in order to do the search.

What you could do is create drop down menus based on the db_select_field hash in your default.cfg file. You can put as many values in these drop-down menus as you like. This is an efficient method of bothing adding/modifying records as well as searching through your database.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Matching multiple fields In reply to
A relevancy search is EXACTLY what I need. I would like the results to be returned in order of AND then OR. In other words, in a 2 term search, items that match both terms listed first, items that match one, listed next.

Can you recommend a database that wouuld do this, preferably PERL running on UNIX. I am NOT a database guru, nor do I have lots of bucks to spend.

If you cannot recommend one, do you know of any programmers that would be willing to make the needed mods, and some idea of how complicated/expensive that would be?

Thanks