Comment 1 for bug 360642

Revision history for this message
Abel Deuring (adeuring) wrote : Re: Searching for "from" does not find bug with "From" in the title (or any other bugs)

psql -d launchpad_dev
psql (9.1.4)
Type "help" for help.

select to_tsvector('from form import fromage');
          to_tsvector
--------------------------------
 'form':2 'fromag':4 'import':3
(1 row)

select to_tsquery('from');
NOTICE: text-search query contains only stop words or doesn't contain lexemes, ignored
 to_tsquery
------------

(1 row)

Launchpad uses the "english" search config, and the examples above show that "from" is dropped from the indexed words.

And Postgres does not return anything for queries containig just a stop word:

select to_tsvector('from form import fromage') @@ ftq('from');
NOTICE: text-search query contains only stop words or doesn't contain lexemes, ignored
CONTEXT: SQL statement "SELECT to_tsquery('default', _ftq($1)) AS x"
PL/Python function "ftq"
 ?column?
----------

(1 row)

But I think the result page for searching a stop word should either state that the query is useless or it should return all possible results that would be returned without the full text search clause.

I also understand that "from" can be an important search term for email related issues, so it might make sense to tweak the set of stop words used in Launchpad. On the other hand "from" is such a common word that I doubt that a full text search for "from" will have any really noticable filter effect.