stored procedure for autosuggest
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 12 Jan 2012 22:56:24 +0000 (17:56 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 23 Jan 2012 17:26:58 +0000 (12:26 -0500)
commit16e6fdc1344d46d47cb117522b1c7762cdac9a7c
treec4adc61c6a9f3960b97acdcdd8326327775d1b25
parent29bb52fdbbb852a166bd9237fc7ce809a6184c11
stored procedure for autosuggest

take:
 query string, like 'foo' or 'foo & ba:*', ready for to_tsquery()
 search_class (class|field|field...)
 markup options for ts_headline()
 optional org unit for opac visibility test
return:
 record id
 marked up matched value
 metabib field where found
 rank
 search_class bouyancy

I think this is mainly Right, except for the ranking/sorting, which I will
revisit.  But aside from sorting, the results of this function make
sense to me.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib_autosuggest.sql