inverted_word_index
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
inverted_word_index [2011/04/09 20:49] – daniel | inverted_word_index [2016/05/16 12:25] – Fix doc links daniel | ||
---|---|---|---|
Line 2: | Line 2: | ||
See also [[http:// | See also [[http:// | ||
- | * [[http:// | + | * [[http:// |
- | * [[http:// | + | * [[http:// |
- | * [[http:// | + | * [[http:// |
===== Function ===== | ===== Function ===== | ||
The word index can be queried in SQL. Here is the code of a PL/pgSQL function that retrieves the IDs of messages containing a set of words. The words are given as an array of text. | The word index can be queried in SQL. Here is the code of a PL/pgSQL function that retrieves the IDs of messages containing a set of words. The words are given as an array of text. | ||
- | The function is already in the Manitou-Mail database for versions 1.0.3 and above | + | The function is already in the Manitou-Mail database for versions 1.1.0 and above |
- | <code sql> | + | <file sql wordsearch.sql> |
-- Input: an array of words to search within the entire index | -- Input: an array of words to search within the entire index | ||
-- Output: the mail_id of the matching messages, as a set. | -- Output: the mail_id of the matching messages, as a set. | ||
Line 73: | Line 73: | ||
$$ LANGUAGE plpgsql; | $$ LANGUAGE plpgsql; | ||
- | </code> | + | </file> |
===== Notes ===== | ===== Notes ===== | ||
- | The formula < | + | The following |
===== Usage ===== | ===== Usage ===== |
inverted_word_index.txt · Last modified: 2016/05/16 12:27 by daniel