pgxn / pgxn-api

Maintain and serve a REST API to search PGXN mirrors
http://pgxn.org/
15 stars 2 forks source link

Selectively index non-stable releases #33

Closed theory closed 9 months ago

theory commented 9 months ago

PGXN::API has traditionally indexed only stable releases. This meant that a search returned no results for distributions that have no stable releases, even if the search query is relevant.

With this change, if a release's status is testing and there are no existing stable releases then add it to the index. If its status is unstable and there are no stable or testing releases then add it to the index.

This will make early releases easier to find via search queries.

Done by a bit of trickery with local and a field in the Indexer. add_distribution makes it local, and then merge_distmeta actually sets it once it has the relevant release history to make the assessment. That setting then sticks for the remaining methods add_distribution calls, but resets when it completes its work. This ensures it's set correctly for the specific release passed to each call to add_distribution.

Resolves #2.

While at it, update the Changes info about the removal of old deployment files and note the attention paid to docfile added in c13c746 (#32).