Skip to content

Search does not work as expected聽#154

Closed

Description

@Whip

馃寧 Environment

  • Environment: Production
  • Device: Samsung M21
  • OS: Android 12
  • App Version & Build: 1.0.7

馃挰 Description

It seems that the search function searches for individual words, not sentences. For example, when I type "sun" it shows me multiple results for the word sun. Great.

Screenshot_20240118-194445_S2

Notice there are a couple of songs that start with "The sun" but when I search for "the sun". Those songs doesn't show up, instead its matching "The Sound" picking s u n separately. "The Sun WIll Rise" was a much better match than "The Sound" but its not even present in the list. Sorry it was snowing in S2 for some reason 馃槅

Screenshot_20240118-194429_S2

Activity

  1. added
    bugSomething isn't working
    on Mar 16, 2024
  2. timusus commented on Sep 26, 2026

    @timusus
    Owner

    Fixed on main by the rewritten search (typo-tolerant word index, SearchIndex in :android:mediaprovider:core). Query tokens match whole words or word prefixes; a token of three letters or fewer gets no typos, so "sun" can no longer match the scattered letters of "The Sound", and a leading "the" is optional. Pinned in SearchLibraryTest ("matches a phrase by its words, not by scattered letters"): "the sun" returns "The Sun Will Rise" first, then "Sunward", and never "The Sound". The test lands with the next push to main.

  3. added a commit that references this issue on Sep 26, 2026
    7fb545e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions