[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dbpack-devel] better searching...
From: |
John 'el asesino del pollo' Harrold |
Subject: |
[Dbpack-devel] better searching... |
Date: |
Wed, 12 Jun 2002 21:27:52 -0400 (EDT) |
hey.
brian figured out how to use the Text::Query::BuildSQL stuff. now you can
do field searches like the folloing:
'file_name: bot and file_name: dawn and mime_type: x-zip'
there are two things i need to work on. the first is errorhandeling in
dbpack_gdb::select. if for example you put 'filename' instead of
'file_name' the page errors out. this is because the column 'filename'
doesn't exsist. this error handeling is something i probably should have
done in the first place, but you know how it goes.
the second thing i think would be useful is find a simpler set of words to
do the field searches. perhaps something like the following:
original replacement
-------------------------------------------------
file_name name or fn or f
file_keywords key or k
mime_type type or t
this is something that is easy enough to do and can unclutter the query.
any preference for the abbreviation?
to implement this i made two functions:
@result = dbpack_gdb::parse_search_string(\$string, \$field_list, \$db_cond,
address@hidden);
fs_files::exec_query(\$dbh, \$string, address@hidden);
the first one in dbpack_gdb has been cleaned up a bit, and has
documentation in pod. the second one is docless thus far but has the
following inputs:
$dbh database handle
$string raw query string eg
'file_name: bot and file_name: dawn and mime_type: x-zip'
@files array of hashes returned by dbapck_gdb::select
i'm probably going to incorporate error handeling in at least
dbpack_gdb::select and probably the other functions. i'm thinking of using
the $@ unless someone can think of a better way.
the changes i made are active on my computer and will be uploaded in the
snapshot tonight.
--
/"\ | john harrold
\ / ASCII ribbon campaign | address@hidden
X against HTML mail |
/ \ | "have algorithm-will travel"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dbpack-devel] better searching...,
John 'el asesino del pollo' Harrold <=