Improvements to the snap search API functionality
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Store Server |
Expired
|
Undecided
|
Unassigned |
Bug Description
Matthew made a document (Canonical private) about how queries and results should be handled:
https:/
We discussed this on the sprint and at the time highlighted a few differences between his vision and the existing behaviour.
We just had a meeting to compare the specifics in this document with the existing API, and came up with a list of improvements. Some are higher priority than others, so I'll put them in priority order and try to comment on priority:
(I'm happy to split this out into separate bugs, but right now it was quicker to write them down all here)
# Suggested improvements
## Reliable page sizes
There's already an issue for this - https:/
Pages are often a different size than what was asked for. This is pretty serious as it's both both confusing (amateur-looking) for the user, and limits our ability to infer things from the API.
## Return total search results
We almost certainly want to expose total number of search results to the user. If the above bug was fixed then we could figure out the total number by making multiple calls to the API - this would be okay in the short term.
In the long term however it would be preferably to see the total number of results for that query returned with every API call.
## Basic query should query publishers and sections
The basic query parameter should also search publishers and sections - e.g. searching for "canonical" should find all snaps by Canonical, and "games" should return all snaps in the "Games" section.
This is less high priority than getting reliable page sizes, but it's still fairly important for a good search experience.
## Search terms should be treated with "or" not "and"
"documentation builder" should return both "documentation-
## International versions of common characters
Currently, searching for "découvertes" finds the Bayam snap, but "decouvertes" gives you nothing.
Could we please make it so that "decouvertes" would find the Bayam snap. This shouldn't work the other way round however - "é" should only be treated as is ("découvertes" should not find "decouvertes")
## Only search on complete words (what is substring search doing? It's weird.)
I can't work out quite how the existing search works. In some cases it seems to do substring search and in some cases it doesn't. "Can" and "onic" both return results for "Canonical". They should not, they should only return results for those actual words.
However, this is not all that high priority.
## Common words should be ignored if any other words exist - e.g. "a", "an", "the"
But results containing these words should be ranked higher than those not containing those words. I can't quite tell if this is happening already, because of the current "and" functionality.
Again, this is not as high priority as the other points.
## Adjustable ranking
It would be nice to consider explicitly which matches cause higher ranking in the search results. E.g. if someone searches for "games", do snaps from a "publisher" called "awesome games" rank higher than snaps in the section "games"?
Can we currently specify this?
description: | updated |
description: | updated |
description: | updated |
Changed in snapstore: | |
status: | New → Confirmed |
tags: | added: search |
tags: |
added: snapfind removed: search |
tags: | added: search |
Changed in snapstore: | |
status: | Confirmed → Incomplete |
tags: | removed: snapfind |
“"games" should return all snaps in the "Games" section” may be a misunderstanding. What I had in mind instead was that the “Games” category would be returned as *a single result* in the set of results.
If it did return every snap in that category, the flood of results could be confusing if you didn’t know that the category existed.