software-o-o icon indicating copy to clipboard operation
software-o-o copied to clipboard

Packages not found when distribution filter enabled

Open logological opened this issue 6 years ago • 8 comments

I have noticed that searching for certain packages fails when the "Distribution" filter is set to something other than "ALL Distributions". For example, if I search for "python3-pelican" with an "ALL Distributions" search, then I get a list of (community) packages for Tumbleweed, Leap 15.0, and Leap 42.3. But if perform the same search with the "Distribution" filter set to "openSUSE Leap 15.0"', then the following message is displayed:

No packages found matching your search. You could try to extend your search to development packages or search for another base distribution (currently openSUSE:Leap:15.0).

logological avatar Jun 04 '18 09:06 logological

Same with 'lutris' as well.

SagnikSRHUSE avatar Jul 07 '18 04:07 SagnikSRHUSE

Okay, we might have some problems with noarch packages. They are filtered out when detecting architecture.

guoyunhe avatar Jul 07 '18 20:07 guoyunhe

The problem is bigger, not only with noarch packages and not only if the distribution filter is on:

https://software.opensuse.org/ (all distributions, all 3 things marked develop debug and language) search for: vice-gtk all ok, there are the results inside home repos.

BUT: search for: vice

it will NOT show the home repos where the package "vice" is inside, it will only show a lot of results where the word "vice" is included, like as example "kserVICE-debugsource"

if i go to: https://build.opensuse.org and search there for it it will be shown immediately (and much faster).

simoN

SimonGerm avatar Jul 16 '18 17:07 SimonGerm

I'll paste this in from my age old admin ticket and the other issue I raised (now both closed).

https://software.opensuse.org/search?q=nut&baseproject=openSUSE%3AFactory&search_devel=true&search_unsupported=false

If you have the right options set, a query as simple as https://software.opensuse.org/search?q=nut doesn't work.

It should show https://software.opensuse.org/package/nut but doesn't.

Old admin report is here: https://progress.opensuse.org/issues/10836

moozaad avatar Nov 06 '18 07:11 moozaad

I suppose that the number of search queries with filter is like 30% or less, maybe you could remove it from the web UI until it is fixed? I mean, it seems that removing this filter temporally from the site will not significantly increase server load, but openSUSE newcomers will not be confused that e.g there is no Steam package for Leap 15.1 (actual "filtered" results at the moment of writing).

shchadilov avatar Nov 06 '19 18:11 shchadilov

I suppose that the number of search queries with filter is like 30% or less

I am not aware of any data that would suggest that. We don't track what users select or search for.

[...] removing this filter temporally from the site will not significantly increase server load. [...]

This is hard for me to guess as well because it depends on many things. The flow for a search on software-o-o is this:

  1. User sends query to software-o-o
  2. software-o-o does a few checks
  3. software-o-o creates an xpath query for OBS
  4. software-o-o uses OBS API with that xpath query
  5. Once the result is in, software-o-o loads additional info from other OBS API endpoints for each result

So depending on how much you get back from OBS, you have to do fewer or more additional API queries (which take a lot of time). Server load as in CPU time is not the problem here, just that more general searches take more time.

Without knowing that filters are not used, I don't think we should disable them. This is not a change that I want users to have to deal with. In this case, we should focus on looking into https://github.com/openSUSE/software-o-o/issues/702

agraul avatar Nov 08 '19 10:11 agraul

I have seen some xpath parameters and array filter operations in software.o.o that might lead to empty search results.

When developing opi, I removed this parameter from the query and then everything starts to work:

https://github.com/openSUSE/software-o-o/blob/master/lib/obs.rb#L81

The xpath query I use is https://github.com/openSUSE-zh/opi/blob/master/opi#L312

The project attribute in XML doesn't mean the distribution you are using but the OBS project it comes from. So when you choose a distribution, you lose most results. The path/project='$distribution' query is the only correct way to select distributions.

guoyunhe avatar Nov 08 '19 11:11 guoyunhe

Just an observation: sometimes searching with a filter can bring better results. Try to search "break" without a filter, and you will not see rsibreak in results, but after choosing Leap 15.2 it shows up.

shchadilov avatar Aug 15 '20 20:08 shchadilov