Search for a record name that begins with a slash in Postgresql Full Text Search

by Sergio D. Márquez   Last Updated November 13, 2018 18:06 PM

I'm trying to match a DB record (operation) that contains a slash with no results.

The operation name field that I'm trying to search contains:

some /word

This is the search:

SELECT 
  "operations".* 
FROM 
  "operations" 
INNER JOIN (
  SELECT "operations"."id" FROM "operations" 
  WHERE (((
          to_tsvector(
            'simple', coalesce("operations"."name" :: text, '')
          )
        ) @@ (
          to_tsquery( 'simple', ''' ' || 'word' || ' ''' || ':*')
        )))
)

I think that psql is indexing '/word' as a file path and not including it as a result.

Is this posible on psql ?



Related Questions


Performing search on a column by query

Updated May 22, 2015 22:02 PM

Fuzzy Matching with Postgresql 9.3

Updated April 06, 2017 14:06 PM