[Refdb-users] web query
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mar...@mh...> - 2003-09-17 19:24:19
|
Hi Bruce, Bruce D'Arcus writes: > > I kind expect to be able to type a partial author and have the web > client return results. Rightfully so... > I want to type just "Doe" rather than "Doe, > John Q." In the absence of this, how do I get this behavior? I can't > seem to figure it out from the docs. > I assume you're using SQLite as the db engine? This is unfortunately one of the weak spots where the implementation of the database engine shines through. Just to make it clear, this has nothing to do with the web interface. The command line client shows exactly the same behaviour. Both MySQL and PostgreSQL support RLIKE (regexp like) comparisons. They work as expected. If you search for an author with the string "Doe", you'll get "Doe, John Q." as well as "DiDoe,M." or any other author whose name contains the character sequence"Doe". SQLite does not support RLIKE, so refdbd has to use LIKE instead. This one uses the much simpler SQL regexps and does not perform partial matches by default. In order to find all Does in your database, you'll have to search for "Doe%" which means "Doe" followed by zero or more arbitrary characters. This is a minor inconvenience when using SQLite. BTW these nasty details are covered in the sections "The query language" and "Regular expressions" in chapter 13 of the manual. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |