Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 761
Ivica Lazarević Avatar asked Nov 12 '12 10:11

Ivica Lazarević


1 Answers

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

like image 141
mys Avatar answered Oct 18 '22 23:10

mys