postgres text search - numhword matching and order
<p>The postgres documentation <a href="http://www.postgresql.org/docs/9.5/static/textsearch-parsers.html" rel="nofollow">here</a> explains the <code>numhword</code> parser as one that matches <em>Hyphenated word, letters and digits</em>.  The example they give for this is <code>postgres-beta1</code> and this matches nicely.  However, somethnig such as <code>postgres-9-beta1</code> does not match, and i can't seem to find a default parser that will work with this.  SQL below. </p>

<p>Is my best choice something that parsed just on spaces?  Is there such a default parser?  (It seems <code>test_parser</code> doesn't ship with 9.5 anymore...) </p>

<p>I want to tokenize alphanumerics, hyphenated.  Am I stuck with regular expressions for the time being, or is there a straightforward way to create a customer parser (without dropping down into C) ?</p>

<pre><code>CREATE TEXT SEARCH DICTIONARY simple_nostem_no_stop (TEMPLATE = pg_catalog.simple);
CREATE TEXT SEARCH CONFIGURATION test_id_search ( COPY = pg_catalog.simple );

alter text search configuration test_id_search
drop mapping for asciihword, asciiword, email, file, float, host, hword, hword_asciipart, hword_numpart, hword_part, int, numhword, numword, sfloat, uint, url, url_path, version, word  ;

ALTER TEXT SEARCH CONFIGURATION test_id_search
ALTER MAPPING FOR numhword WITH simple_nostem_no_stop;

\dF+ test_id_search

Text search configuration "public.test_id_search"
Parser: "pg_catalog.default"
Token    |     Dictionaries
---------+-----------------------
numhword | simple_nostem_no_stop

/* This works as i hoped, per the docs:  */
    test_db=# select to_tsvector('test_id_search', ' postgresql-beta1 ') ;
    to_tsvector
    ----------------------
    'postgresql-beta1':1
    (1 row)

/* This doesn't seem to work? */
    test_db=# select to_tsvector('test_id_search', ' postgresql-9-beta1 ') ;
    to_tsvector
    -------------

    (1 row)
</code></pre>