Gossamer Forum
Home : Products : DBMan : Discussions :

keyword search within lt / gt search vs. keywords override normal search

Quote Reply
keyword search within lt / gt search vs. keywords override normal search
Currently I have a problem.

I want to allow someone to search by keyword but also specify either a minimum and maximum length or a span of years (newer than 1990 for example.)

However, at presetn, if you specify a keyword that overrides anything else.

For example a search with these paramaeters
&length-gt=20&length-lt=30&keyword=this-keyword

results in matches for this-keyword even if the length is less than 20 or greater than 30.

How can I make the keyword search take place within the less than / greater than paramaters also passed to the dbman script?
Quote Reply
Re: [Jeff-C] keyword search within lt / gt search vs. keywords override normal search In reply to
I would suggest setting up a custom or advanced search form. This way you can allow for more detailed searches and more ability than the keyword search will provide.

Check out the FAQ noted below under the topic "Search" for many threads and idea on how accomplish what you want.

You will get various ideas and examples of how to setup an advanced search form or provide both types of searches for your users.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] keyword search within lt / gt search vs. keywords override normal search In reply to
Thanks very much for the reply Lois.

So you're saying the keyword=whatever will always override and negate any greater than / less than options specified in the search form and there's no way to change that?

I guess I can add text fields to my search form such as:
manufacturer [ ]
model [ ]
year newer than [select]

I was hoping I could use:
keyword [ ]
year newer than [select]

where the keyword would search within 'model' 'manufacturer' and 'description' at the same time and still be limited by the greater than year selection, but I guess that is impossible as keyword will always negate the gt- search on the year field?

Last edited by:

Jeff-C: Feb 15, 2004, 1:18 AM
Quote Reply
Re: [Jeff-C] keyword search within lt / gt search vs. keywords override normal search In reply to
There have been some variations of using the keyword search ... for instance multiple words, etc.

Your best bet is to check out the DBMan FAQ and see what others have done.

But to get fancy and to allow users to really focus on just what they are looking for I would suggest using an advanced search form.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/