Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Clarify search results on the search page #76

Open
xxxserxxx opened this issue Oct 15, 2024 · 1 comment
Open

[Feature] Clarify search results on the search page #76

xxxserxxx opened this issue Oct 15, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@xxxserxxx
Copy link
Collaborator

c.f. the thread in the song search issue, the Subsonic API does not clearly define how servers should implement search3. Two changes:

  1. retitle the colums on the search page to "artist matches", "album matches", and "song matches"
  2. One of the solutions below

Details:

search3 returns a searchResults3 that contains a structure that has an array of artist, an array of album, and an array of song: these are the elements returned as search results, grouped by type. However, the API documentation says only that the server should "search in the IDv3 tags" -- but not which tags, or how results are grouped.

Gonic puts all the artists who's name matched in the artist array, and all the albums and songs whose titles matched the query in the album and artist arrays. Navidrome, on the other hand, matches across several fields of metadata and includes any such matches in the arrays. This means that a query for "XYZ" will include a song titled "ABC" by author "XYZ" in the song array.

Solution 1

Add a "why" label at the page bottom, and when an item is selected, print the IDv3 tag name and value that caused the match. If there are multiple tag matches, show the first.

The benefit is that search3 would show the same results in stmps as it does in Navidrome. The con is that many, many songs who are only peripheral matches because of their album titles or authors will be in the song column.

Solution 2

Emulate gonic's search3 logic, and only show name/title matches, such that every item in every column will contain the query term.

The pro to this approach is a more focused search results, where every result is a direct match, and duplicates are reduced. The con is that the client might have to make several sequential paging calls to the server to get enough content to fill the columns.

Right now, the code uses the default paging: 20 of each type of thing. The user presses n to fetch the next page of things. With gonic, this is a single call every time: 20 or fewer more of each thing is fetched with each call. With Navidrome, several pages of songs who only matched because they're in albums who's titles matched could be returned; if we're only listing songs in the song column whose titles match the query, then several calls to Navidrome might need to be made. It would be unacceptable to have nothing be added when the user presses n, since they wouldn't realize that there could be more.

SER

I believe solution 2 is tighter, clearer, and reduces result clutter.

xxxserxxx added a commit that referenced this issue Oct 15, 2024
@xxxserxxx xxxserxxx self-assigned this Oct 15, 2024
@xxxserxxx xxxserxxx added the enhancement New feature or request label Oct 15, 2024
@xxxserxxx xxxserxxx added this to the v1.0.0 milestone Oct 15, 2024
@xxxserxxx
Copy link
Collaborator Author

Since search is already merged, and since it behaves poorly for Navidrome, I'd like these enhancements for v1.0.0

spezifisch pushed a commit that referenced this issue Oct 28, 2024
* feature: #76, clarify search results

* add: search now pro-actively searches until no more results are returned. It still queries in batches of 20, and updates the list(s) as results are available.

* add: search result counts in the column titles

* Stupid git.

---------

Signed-off-by: Sean Russell <60757196+xxxserxxx@users.noreply.github.com>
xxxserxxx added a commit that referenced this issue Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant