elementary / appcenter

Pay-what-you-can app store for elementary OS
https://elementary.io
GNU General Public License v3.0
541 stars 101 forks source link

AppStream search isn't predictable #982

Open donadigo opened 5 years ago

donadigo commented 5 years ago

Searching "appeditor" doesn't return AppEditor but i.e. other apps like Spice-Up, Quilter are there. Not sure if this issue could apply to other queries.

peteruithoven commented 5 years ago

This might be related to: https://github.com/elementary/appcenter/issues/942

This is probably also an issue with appstream as using the same search terms via the appstreamcli tool produces the same result:

appstreamcli search appeditor | grep appeditor
appstreamcli search appeditor | grep quilter  
Identifier: com.github.lainsce.quilter [desktop-application]
Package: com.github.lainsce.quilter
Homepage: https://github.com/lainsce/quilter/
Icon: com.github.lainsce.quilter_com.github.lainsce.quilter.png
cassidyjames commented 4 years ago

I can confirm the search and ranking from AppStream for appeditor doesn't make sense to me and returns a ton of unrelated apps, but not AppEditor.

peteruithoven commented 4 years ago

Looks like the https://github.com/ximion/appstream/issues/216 issue wasn't really fixed or somehow we don't have the latest version?

appstreamcli search appeditor | grep appeditor

Still gives

appstreamcli search appeditor | grep quilter  
Identifier: com.github.lainsce.quilter [desktop-application]
Package: com.github.lainsce.quilter
Homepage: https://github.com/lainsce/quilter/
Icon: com.github.lainsce.quilter_com.github.lainsce.quilter.png

Even though we do seem to have the latest version of appstream

$ apt show appstream           
Package: appstream
Version: 0.12.10-2+elementary5~ubuntu5.1.2.1

Which is the latest release: https://github.com/ximion/appstream/releases

davidmhewitt commented 4 years ago

Well, an issue titled "Search issues" where everyone talks about having issues searching for "calculator" isn't necessarily going to solve an issue searching for "AppEditor" or every search issue in the world.

From looking at the appstream search code, it's tokenizing and stemming the search query and has a greylist of terms to not include in the query: https://github.com/ximion/appstream/blob/e2fe69784cfa3a64e59eebb32135d3509295f842/src/as-pool.c#L107

"app" is one of those, so I suspect searching for "AppEditor" is actually technically searching for "editor".

I think that's a different, more specific, issue to raise.