I am trying to use PostgreSQL to implement a full-text search system.

I encounter this strange or may be intended feature with that.

While trying to index or search for a column which contains names of files with extension (e.g. myimage.jpg), the system treats it as a url and does not properly tokenize.

I referred to the documentation and see that via ts_debug that the file name is taken as a host of a url.

Could some one tell how to take all inputs as normal word in the FTS of PostgreSQL.

Also, on a second request, how can one do a contains, startswith, and endswith searches with it?

I have tried the statement create text search configuration..., copied from pg_catalog.english and removed host,url, and url_path and then specified the configuration for the ts_debug method. But still no go., myimage.jpg is still identified as host.

I use version 9.4