Mat,
there are several function you may use to see (please, read documentation):
apod=# select to_tsvector('Hi my email addres is psql-mail@freeuk.com');
to_tsvector
----------------------------------------------------
'hi':1 'addr':4 'email':3 'psql-mail@freeuk.com':6
(1 row)
or, even better
apod=# select * from ts_debug('Hi my email addres is psql-mail@freeuk.com');
ts_name | tok_type | description | token | dict_name | tsvector
-----------------+----------+-------------+----------------------+-----------+------------------------
default_russian | lword | Latin word | Hi | {en_stem} | 'hi'
default_russian | lword | Latin word | my | {en_stem} |
default_russian | lword | Latin word | email | {en_stem} | 'email'
default_russian | lword | Latin word | addres | {en_stem} | 'addr'
default_russian | lword | Latin word | is | {en_stem} |
default_russian | email | Email | psql-mail@freeuk.com | {simple} | 'psql-mail@freeuk.com'
(6 rows)
You may write your own parser or preprocess text before tsearch.
Oleg
On Mon, 11 Aug 2003, Mat wrote:
> Can Tsearch be used to return substring matches?
>
> i.e
>
> Text to search: Hi my email addres is psql-mail@freeuk.com
>
> Query "psql" would match the email address?
>
> Query "mail" would also match?
>
> Query "reeu" would also match?
>
> Or is tsearch not suitable for this type of query? should i use FTI
> instead?
>
> Thanks.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83