scalacenter / scaladex

The Scala Package Index
https://index.scala-lang.org
BSD 3-Clause "New" or "Revised" License
198 stars 76 forks source link

Display artifacts in search results instead of projects #326

Open adamvoss opened 7 years ago

adamvoss commented 7 years ago

There is an inconsistency between the perspective of the Search Box and the Search Results. The search box expects at "$project/$artifact" while the search results show "$organization/$project"

For example if I query for "depends-on:akka/akka-actor" I see the top result is "scala-academy/performance-analysis". If I then query on "depends-on:scala-academy/performance-analysis" to see what "scala-academy/performance-analysis" depends on I get no results because "scala-academy/performance-analysis" is not an artifact.

Similarly, if I search for "scala-reflect": "scala/scala" comes up as the first result, but "scala/scala-reflect" is nowhere to be seen because "scala/scala-reflect" is an artifact.

To resolve this the search results should display artifacts and not projects.

Discussion leading to this conclusion began with this post on gitter.

adamvoss commented 7 years ago

Making my implementation suitable to submit a PR would require providing a passable implementation of pagination. I think I know how I would to that, but based on the results, while I still think this is where Scaladex should am to get, I am not quite sure it is ready for this to be implemented yet based on this preview:

screen shot 2017-01-06 at 18 36 40-fullpage

As you can see there is a dearth of information pertaining to artifacts and I worry that the above only exacerbates #303, which itself needs some concentrated thought about what information is and can be available to figure out how to best rank search results.

I was aware of this information gap in #325, but was hoping it might catalyze an effort for improving the data. However, I worry results like the above screen shot would cause too strong of negative usability impact at the moment.

If something should still be done now with this, the best middle ground I can think of is to list the artifacts as hyper-links within the search row for a project, which may be a suitable stop-gap measure.

Mock-up: image

MasseGuillaume commented 7 years ago

This is really cool. When I tried the second solution, the list was too long for some projects like akka (100 artifacts in one project)

adamvoss commented 7 years ago

I'm fine with this being closed for now. I am still of the opinion that when/if the data deficiencies are remedied searching on artifacts as this ticket proposed is likely the better approach.