diff options
author | Yorhel <git@yorhel.nl> | 2010-03-13 15:34:24 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-03-13 15:34:24 +0100 |
commit | b8fbb458cdbf6635c45675a3797292110a739f31 (patch) | |
tree | af39f8ae60ba4fa49c92d41a1dc3484d990914b9 /util/updates | |
parent | d5bb5bfc9fd4a043be20bb0e7ba68dbb39157862 (diff) |
Improved VN search
This adds a new column to the vn table: c_search, which holds the
normalized titles for speedy search results using LIKE.
Also split some functions from VNDB::Func that didn't require YAWF into
a VNDBUtil module, so Multi can also make use of them. The normalization
functions are the same for Multi and VNDB, after all.
The API and Multi::IRC still use the old search, these should be updated
as well.
Diffstat (limited to 'util/updates')
-rw-r--r-- | util/updates/update_2.12.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/updates/update_2.12.sql b/util/updates/update_2.12.sql new file mode 100644 index 00000000..4d3dc4a4 --- /dev/null +++ b/util/updates/update_2.12.sql @@ -0,0 +1,9 @@ + +-- cache for search +ALTER TABLE vn ADD COLUMN c_search text; + +\i util/sql/func.sql + +CREATE TRIGGER vn_vnsearch_notify AFTER UPDATE ON vn FOR EACH ROW EXECUTE PROCEDURE vn_vnsearch_notify(); +CREATE TRIGGER vn_vnsearch_notify AFTER UPDATE ON releases FOR EACH ROW EXECUTE PROCEDURE vn_vnsearch_notify(); + |