Replies: 4 comments 12 replies
-
In theory a keyword or author search with no terms is the same as heading to the existing author page and keyword page. The benefit being that they can add additional filters to that search, or add a search term - ultimately providing more tools for the user to find the package they really want. |
Beta Was this translation helpful? Give feedback.
-
I think the distinction is Swift compatibiliy, and OS compatibility.
OS compatibility is a strict match or no match (no greater/less than comparison).
Remember all queries are "AND" conditions. Do if you want iOS and macOS compatibility you would do |
Beta Was this translation helpful? Give feedback.
-
Consolidated from #1229 where @Sherlouk suggested:
I think Something like counters for:
|
Beta Was this translation helpful? Give feedback.
-
I've had a closer look at what it would mean to support platform filters. The SQL query for a single package is as follows: -- package compatibility
select b.platform
from packages p
join versions v on v.package_id = p.id
join builds b on b.version_id = v.id
where p.url = 'https://github.com/soto-project/soto-core.git'
and v.latest is not null
and b.status = 'ok'
group by b.platform
having count(*) > 0
order by b.platform This is fast (< 30ms on the amazing M1). However, in order to support search, we'd need to include it in the materialised view: CREATE MATERIALIZED VIEW search AS
SELECT
p.id AS package_id,
...
v.package_name,
array(
select _b.platform
from versions _v
join builds _b on _b.version_id = _v.id
where _v.package_id = p.id
and _v.latest is not null
and _b.status = 'ok'
group by _b.platform
having count(*) > 0
order by _b.platform
) AS platform_compatibility
FROM packages p
... yielding (We may to consider folding all the The problem with this is that creating/refreshing the materialised view takes 24s (again on the M1), and we refresh the view after each analysis pass (running ~every 30s-1min or so). So this would increase the analysis runtime considerably. There are a couple of things we could do here:
The cons are:
So I think the way to go would be 3. as that's pretty much the least amount of extra work we'd need to do. We'd still need to add the column to the search but it's a straight 1:1 copy from A very similar mechanism would also work for Swift versions (but I'd take it a step at a time). |
Beta Was this translation helpful? Give feedback.
-
With what is currently merged in, we currently support the following search filters.
With pull requests currently ongoing, we will hopefully soon support the following.
Here are some initial ideas which I had that could be extremely helpful.
Beta Was this translation helpful? Give feedback.
All reactions