Closed lightbe closed 1 year ago
This is because you're using dictionary: "english"
The english text search configuration filters out stopwords like "a" and "I" which are very common in English. You probably want "simple" as the dictionary if your search text needs to support searching arbitrary strings of characters that are not English prose.
When I do a single character query for a, i, s or t I don't receive any results. For those same letters if I do a two character query starting with the letter I get results. Here are two examples.
Query for a received no results. Query for aa got the following results.
aa5j3uktdeb2gknqx99.ga aa5j3uktdeb2gknqx99.ml aa5j3uktdeb2gknqx99.tk aa5zy64.com aaaa22222.info aaaa66666.info
Query for i received no results. Query for ia got the following results.
ia4stypglismiks.cf ia4stypglismiks.ga ia4stypglismiks.gq ia4stypglismiks.ml ia4stypglismiks.tk iamail.com
I'm expecting rows to display for a, i, s and t like they do when I do a single character query for the other alphabets & single digits.
Ruby code
pg_search code in my model:
I'm using:
Ruby 2.7.5 ActiveRecord 7.0.3.1 PostgreSQL 14.4