Closed anasereijo closed 1 year ago
this should be fixed in the snap servers
this should be fixed in the snap servers
@Feichtmeier I am in touch with the snap store team about this. Could you please let me know what API call you used for this? Thank you
Seems that the website does a better job on results, I think that's why they are asking about the API call
we are using a service class here that just calls snapd.dart find
https://github.com/ubuntu-flutter-community/software/blob/main/lib/services/snap_service.dart#L138
here
-->
https://github.com/canonical/snapd.dart/blob/main/lib/src/snapd_client.dart#L1158
So I assume since we do not sort the search in any ways as far as I remember (:older_man: ), this issue must be either in the snap daemon or snapd.dart
Better ask @robert-ancell then or @d-loose
The Snap Store server does return things in what seems to be the proper order; specifically, mailspring is the first match. Test it yourself :)
curl -H "Snap-Device-Series: 16" "https://api.snapcraft.io/v2/snaps/find?q=mail&fields=title,summary,media,publisher" | jq . |
to show-and-tell:
$ curl -sH "Snap-Device-Series: 16" "https://api.snapcraft.io/v2/snaps/find?q=mail&fields=title,summary,media,publisher" | jq .results[0].name
"mailspring"
So:
But to confirm, this does not seem to be an issue stemming from the Snap Store servers.
snapd.dart is returning the results in the order as returned from snapd.
$ dart example/find.dart mail
Name Version Publisher Summary
mailspring 1.10.8 foundry376 The best email app for people and teams at work
maildir-utils 1.8.14 alexmurray Maildir indexer/searcher with an Emacs UI
zbctl 8.1.5 mail-falko-menge zbctl is the command line interface to interact with Camunda Platform 8 and Zeebe
You can contact snapd directly with curl --unix-socket /var/run/snapd.socket http://localhost/v2/find?q=mail| jq .
and see the same order.
Just checked again, and today is returning the results as it should ๐ค
I can't reproduce the original issue - the results always show in the expected order. Is this still an issue for anyone? @anasereijo?
I just tested it and I can't reproduce it. I got the exact same result as the snapcraft website.
Seems that it was a glitch, and it's working fine. @d-loose if there's nothing you can do to investigate it further, you can close it. Thank you!
Thanks, feel free to re-open it, if you encounter it again!
In this specific example, when search for the query 'mail', the only result with that partial query is not showing up as the first result. Is there a way to fix this?