tsearch2 keep throw-away characters - Mailing list pgsql-general

From Kimball
Subject tsearch2 keep throw-away characters
Date
Msg-id a050b8390705151814i4c1c14daw7251f021b66d8cb6@mail.gmail.com
Whole thread Raw
Responses Re: tsearch2 keep throw-away characters
List pgsql-general

postgres=# select to_tsvector('default','I know how to code in C#, java and C++');
             to_tsvector
-------------------------------------
'c':7,10 'code':5 'java':8 'know':2
(1 row)

postgres=# select to_tsvector('simple','I know how to code in C#, java and C++');
                               to_tsvector
-------------------------------------------------------------------------
'c':7,10 'i':1 'in':6 'to':4 'and':9 'how':3 'code':5 'java':8 'know':2
(1 row)


I'd like to get lexemes/tokens 'c#' and 'c++' out of this query.  Everything I can find has to do with stop words.   How do I keep characters that tsearch throws out?  I've already tried 'c\#' and 'c\\#' etc, which don't work. 

Kimball

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Data replication through disk replication
Next
From: woodb@niwa.co.nz
Date:
Subject: Re: basic postgres questions...