full text searches for stop words return no results

Bug #360642 reported by Daniel Hahler
22
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://bugs.edge.launchpad.net/ubuntu/+source/thunderbird/+bugs?field.searchtext=from should find bug 357864.

I've thought it was related to "from" being in quotes, but I've just tested it with "from dropdown" as title on dogfood.launchpad.net and the result has been the same.

Searching for "from" actually returns 0 results: https://bugs.dogfood.launchpad.net/ubuntu/+bugs?field.searchtext=from

Daniel Hahler (blueyed)
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)
Daniel Hahler (blueyed)
affects: launchpad → malone
tags: added: search
Changed in malone:
status: New → Confirmed
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.

Revision history for this message
Abel Deuring (adeuring) wrote :

"Un-duped" because bug 29713 is marked "fix committed" but the issue described in this bug remains.

summary: - Searching for "from" does not find bug with "From" in the title (or any
- other bugs)
+ full text searches for stop words return no results
Changed in launchpad:
importance: Undecided → Critical
Revision history for this message
Abel Deuring (adeuring) wrote :

marked as critical since other full text search bugs are also marked critical.

Curtis Hovey (sinzui)
Changed in launchpad:
status: Confirmed → Triaged
William Grant (wgrant)
Changed in launchpad:
importance: Critical → Low
William Grant (wgrant)
tags: added: bug-search
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.