0

I am using Postgres FTS to search a field in a table. The only issue is for some reason the below issue is happening.

store=# select name from service where to_tsvector(name) @@ to_tsquery('find:*') = true;
     name     
--------------
 Finding Nora
(1 row)

store=# select name from service where to_tsvector(name) @@ to_tsquery('findi:*') = true;
 name 
------
(0 rows)

store=# select name from service where to_tsvector(name) @@ to_tsquery('findi:*') = true;

How come when searching using the query findi:*,the result doesnt show?

1 Answer 1

1

In my PG 12.2 with default text search configuration I have:

# select to_tsvector('Finding Nora');
    to_tsvector    
-------------------
 'find':1 'nora':2
(1 row)

# select to_tsquery('findi:*');
 to_tsquery 
------------
 'findi':*
(1 row)

I understand that because there is no lexeme findi in the default dictionary, the query does not find any match.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.