Ivica Lazarević
Ivica Lazarević

Reputation: 123

How to specify minimum word length in PostgreSQL full text search?

Is there a way to prevent words shorter than a specified value end up in tsvector? MySQL has the ft_min_word_len option, is there something similar for PostgreSQL?

Upvotes: 9

Views: 1638

Answers (1)

mys
mys

Reputation: 2473

The short answer would be no.

The tsearch2 uses dictionaries to normalize the text:

12.6. Dictionaries

Dictionaries are used to eliminate words that should not be considered in a search (stop words), and to normalize words so that different derived forms of the same word will match. A successfully normalized word is called a lexeme.

and how the dictionaries are used Parsing and Lexing

Upvotes: 3

Related Questions