In a Rails app I'm using the pg_search gem. When I run my RSpec suite I see many lines of:
NOTICE: text-search query doesn't contain lexemes: ""
LINE 1: ...e("pg_search_documents"."content"::text, '')))), (''), 0)) A...
I'm not sure what this means, or whether it's something I should be concerned about.
Can anyone help?
I'm the author and maintainer of pg_search.
That message means that your search query ended up having no words in it. Thus, PostgreSQL is warning you that you won't get any results, and the query is not that useful.
It's safe to ignore. pg_search always sends the query to the database, even in edge cases like this where the query is meaningless. If you really want to avoid it, you could add logic to your application to detect blank queries and not call through to the pg_search scope.
In rails 3.2.2 I used this in My database.yml for getting rid of the notice messages from postgres.
test:
min_messages: warning
#... default configurations...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With