Gossamer Forum
Home : Products : DBMan : Installation :

Keyword -- Error: Search Failed

Quote Reply
Keyword -- Error: Search Failed
Hi, This is the second database I've set up with dbman and it's terrific but I have a stubborn problem at the moment.

http://kforer.com/timepiece/db.cgi?db=default&uid=default

I somehow can't do a keyword search (it worked fine on #1). My keyword searches come up with "no search terms specified" (sub query).

sub date_to_unix is modified in this script, but I can't see how that would affect keyword search. Any suggestions?

Kathy

Quote Reply
Re: Keyword -- Error: Search Failed In reply to
You have made no changes at all to sub query?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Keyword -- Error: Search Failed In reply to
Actually, yes, I made the changes suggested in, as chance would have it, your excellent
"U N I V E R S A L D A T E T R A N S L A T O R." However, I don't think that's what's wrong.

What could be wrong? it seems to think I haven't populated the search fields with "Fill %in with keyword we are looking for."

What is 'keyword' anyway? Is it related to keys? Is there a subroutine for it or is it a function?

I've done "Find Differences" on all the files and can't see what's changed.

Quote Reply
Re: Keyword -- Error: Search Failed In reply to
Check to make sure you have the following in sub query:

Code:

# First thing we do is find out what we are searching for. We build a list of fields
# we want to search on in @search_fields.
if ($in{'keyword'}) { # If this is a keyword search, we are searching the same
$i = 0; # thing in all fields. Make sure "match any" option is
$in{'ma'} = "on"; # on, otherwise this will almost always fail.
foreach $column (@db_cols) {
if (($db_sort{$column} eq 'date') or &date_to_unix($in{'keyword'})) { $i++; next; }
if ($i == $auth_user_field) { $i++; next; }
push (@search_fields, $i); # Search every column
$in{$column} = $in{'keyword'}; # Fill %in with keyword we are looking for.
$i++;
}
}
JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Keyword -- Error: Search Failed In reply to
>>I've done "Find Differences" on all the files and can't see what's changed.<<

Not strictly true. In case anyone else runs into the same problem:
I had some non-standard date and time fields. Once I changed their field-type from "date" to "alpha" in default.cfg I was able to do the search.

I don't know yet whether the handy-dandy ;) Universal Date Translator was involved with this as I deleted its modifications. If it was, I'll re-post, but for now I assume it was my "time" fields (with &get_time) which were causing problems.

Quote Reply
Re: Keyword -- Error: Search Failed In reply to
Well, yes, having "date" as the field type for all of your fields would cause the problem you had.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Keyword -- Error: Search Failed In reply to
It looks clearer in red, somehow. I hadn't seen clearly how 'keyword' was "pushed" into all the fields.

Thanks for your help.
It helped me focus that "date" was problematic.