Skip to content

Instantly share code, notes, and snippets.

@longkey1
Last active December 15, 2015 16:39
Show Gist options
  • Save longkey1/5290390 to your computer and use it in GitHub Desktop.
Save longkey1/5290390 to your computer and use it in GitHub Desktop.
CREATE OR REPLACE FUNCTION to_tsvector_ungm(text) RETURNS tsvector AS $$
select to_tsvector('simple', array_to_string(regexp_split_to_array($1, E'\\s*'),' '));
$$ immutable language sql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment