Unity search results depends on typing speed

Bug #764352 reported by lawenlerk
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
unity-lens-applications
Fix Released
Undecided
Unassigned
unity-lens-files
Fix Released
Low
Unassigned
unity-lens-applications (Ubuntu)
Fix Released
Undecided
Unassigned
unity-lens-files (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When typing into the unity search bar to look for files, I get different results depending on whether i type in normal speed or type in each letter slowly.

To illustrate, I was looking for the file "Elementary_Linear_Algebra_with_Applications__9_edition.pdf".
if i type 'elementary' into the main unity search bar with my usual typing speed, the file turns up in the results as expected.
However, if i type 'e', pause for a second, 'l', pause for a second, and so on until i finish typing the word 'elementary', the file does not show up even though the search query is technically the same.

Changed in unity:
importance: Undecided → Low
Changed in unity (Ubuntu):
importance: Undecided → Low
Changed in unity-place-files:
importance: Undecided → Low
Omer Akram (om26er)
Changed in unity:
status: New → Confirmed
Changed in unity-place-files:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity-place-files (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

I have a hunch as to why this happens. It's probably related to the way we do incremental filtering of the result sets. You can confirm my suspicion if typing "el" fast and then proceeding with e, l, e, m, ... slowly after that produces the desired results?

Revision history for this message
lawenlerk (lawenlerk) wrote :

Yes, if i type "el" fast and then 'e' and 'm' slowly, the file does appear (but not always). Also, im not sure if this helps but the file appears after i finish typing "elem" if and only if it already appeared when i typed "el".

I'd be happy to help test out more "scenarios" if you'd like.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Thanks lawenlerk, this is exactly the info I need :-)

So the reason why this happens is that in order to do incremental narrowing down of the result set we grab a huge chunk of search results from Zeitgeist. We can't just grab all of the results because there might be umpteen gajillion of them and that would be pretty hefty :-)

When you then pass in a query like "e" which has tonnes of hits we only extract the first N results and if the desired doc is on position N+1 we wont ever get it since we only narrow the result set down.

This is all a hack of course, trying to work around the fact that narrowing down search results like we do isn't really doable with the current software architecture. Another hack we can add on top could be to not fire searches when the search string is just one letter. Or alternatively simply disable the incremental searching and always do a full rebuild of the result model (we already do this fx. in the apps place).

Changed in unity:
status: Confirmed → Triaged
Changed in unity-place-files:
status: Confirmed → Triaged
Changed in unity (Ubuntu):
status: Confirmed → Triaged
Changed in unity-place-files (Ubuntu):
status: Confirmed → Triaged
Changed in unity-2d:
status: New → Triaged
Changed in unity-lens-files (Ubuntu):
status: New → Triaged
Revision history for this message
Ivan Danov (danov) wrote :

It happens in unity-lens-applications too. When I type fast "terminal" in the main search field (home dash) and press <enter> without waiting, sometimes LibreOffice is opened. Sometimes some gwibber links are opened too (since I have installed unity-lens-gwibber too). If I want to open the correct item, I have to wait sometimes up to 1-2 seconds and then press <enter>.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-lens-applications (Ubuntu):
status: New → Confirmed
Changed in unity-lens-applications:
status: New → Confirmed
Revision history for this message
Michal Hruby (mhr3) wrote :

I don't think this is the case anymore, as both apps and files lens now do full query on each letter (of course typing just "e" might not return the desired file because of limit on number of results)

Changed in unity-lens-applications:
status: Confirmed → Incomplete
Changed in unity-lens-files:
status: Triaged → Incomplete
no longer affects: unity-place-files (Ubuntu)
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Michal: where is this supposed to be fixed? In updates to Oneiric or in the current development version?

Revision history for this message
Michal Hruby (mhr3) wrote :

@Marius: both

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

In Precise, technical items are visible in the unity search.

Revision history for this message
Michal Hruby (mhr3) wrote :

Yet this bug is about different results when typing query fast vs slow. If you're seeing technical items in the apps lens, please open a new bug.

no longer affects: unity-2d
no longer affects: unity
no longer affects: unity (Ubuntu)
Changed in unity-lens-applications:
status: Incomplete → Fix Released
Changed in unity-lens-files (Ubuntu):
status: Triaged → Fix Released
Changed in unity-lens-applications (Ubuntu):
status: Confirmed → Fix Released
Changed in unity-lens-files:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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