full text searches for stop words return no results
Bug #360642 reported by
Daniel Hahler
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
Searching for "from" does not find bugs with the word "from" in the title.
E.g. https:/
I've thought it was related to "from" being in quotes, but I've just tested it with "from dropdown" as title on dogfood.
Searching for "from" actually returns 0 results: https:/
summary: |
- Searching for "from" does not find bug with "From" in the title + Searching for "from" does not find bug with "From" in the title (or any + other bugs) |
affects: | launchpad → malone |
tags: | added: search |
Changed in malone: | |
status: | New → Confirmed |
Changed in launchpad: | |
status: | Confirmed → Triaged |
Changed in launchpad: | |
importance: | Critical → Low |
tags: | added: bug-search |
To post a comment you must log in.
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'); 'default' , _ftq($1)) AS x"
NOTICE: text-search query contains only stop words or doesn't contain lexemes, ignored
CONTEXT: SQL statement "SELECT to_tsquery(
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.