-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort by downloads doesn't #396
Comments
cc @lazypenguin |
That's strange as it's working on my local build. Looks like the results aren't coming back sorted from the API endpoint (https://crates.io/api/v1/crates?page=1&per_page=10&q=log&sort=downloads). Was the target re-built in production? |
Hm it should be yeah, maybe the sql query should be updated? |
@alexcrichton I'm running Postgres 9.5.3 on my system, I see in the travis build it's using 9.3, is that the same for production? Would you be able to test this query against that database? Should help us narrow down the issue. SELECT crates.* FROM crates,
plainto_tsquery('test') q,
ts_rank_cd(textsearchable_index_col, q) rank
WHERE q @@ textsearchable_index_col
ORDER BY name = 'test' DESC, rank DESC, crates.downloads DESC
LIMIT 0 OFFSET 10; |
Looks like Heroku is using Postgres 9.3.9 and that query itself doesn't return anything for me (LIMIT 0), but did you intend to test something else perhaps? |
My mistake, left off a digit on the limit. I've tested the front end with SELECT crates.* FROM crates,
plainto_tsquery('test') q,
ts_rank_cd(textsearchable_index_col, q) rank
WHERE q @@ textsearchable_index_col
ORDER BY name = 'test' DESC, rank DESC, crates.downloads DESC
LIMIT 10 OFFSET 10; |
Sure:
|
Alex, do you mind confirming that this produces the correct sort before I submit a new pull request? SELECT crates.* FROM crates,
plainto_tsquery('test') q,
ts_rank_cd(textsearchable_index_col, q) rank
WHERE q @@ textsearchable_index_col
ORDER BY name = 'test' DESC, crates.downloads DESC, rank DESC,
LIMIT 10 OFFSET 10; Thanks for the patience. |
Oh yeah no worries, that generates:
|
Going to https://crates.io/search?q=markdown&sort=downloads it looks like it's still working correctly? |
@Keats I think what you're seeing is that there's a crate with the exact name that matches your query, and crates.io is ALWAYS putting that one first. This could be made clearer, want to file a new issue for that? |
@carols10cents Done in #493 |
…r-7.0.0, r=Turbo87 Bump ember-resolver from 4.2.4 to 7.0.0 Bumps [ember-resolver](https://github.com/ember-cli/ember-resolver) from 4.2.4 to 7.0.0. <details> <summary>Release notes</summary> *Sourced from [ember-resolver's releases](https://github.com/ember-cli/ember-resolver/releases).* > ## v7.0.0 > #### 💥 Breaking Change > * [#452](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/452) Remove dead module unification code ([@​stefanpenner](https://github.com/stefanpenner)) > > #### 🚀 Enhancement > * [#450](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/450) remove now defunct v8 optimization ([@​stefanpenner](https://github.com/stefanpenner)) > > #### 🐛 Bug Fix > * [#475](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/475) Fix babel-plugin-debug-macros warning ([@​hjdivad](https://github.com/hjdivad)) > > #### Committers: 2 > - David J. Hamilton ([@​hjdivad](https://github.com/hjdivad)) > - Stefan Penner ([@​stefanpenner](https://github.com/stefanpenner)) > > > ## v6.0.2 > * Re-release v6.0.0, to avoid SemVer issue with removal of module unification support within 6.x. > > ## Release 6.0.1 > #### 💥 Breaking Change > * [#452](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/452) Remove dead module unification code ([@​stefanpenner](https://github.com/stefanpenner)) > > #### 🚀 Enhancement > * [#450](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/450) remove now defunct v8 optimization ([@​stefanpenner](https://github.com/stefanpenner)) > > #### 🐛 Bug Fix > * [#475](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/475) Fix babel-plugin-debug-macros warning ([@​hjdivad](https://github.com/hjdivad)) > > #### Committers: 2 > - David J. Hamilton ([@​hjdivad](https://github.com/hjdivad)) > - Stefan Penner ([@​stefanpenner](https://github.com/stefanpenner)) > > ## Release 5.3.0 > ## v5.3.0 (2019-09-24) > > #### 🚀 Enhancement > * [#417](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/417) Add support for nested colocated components. ([@​rwjblue](https://github.com/rwjblue)) > > #### Committers: 1 > - Robert Jackson ([@​rwjblue](https://github.com/rwjblue)) > > ## Release 5.2.1 > ## v5.2.1 (2019-08-09) > > #### 🐛 Bug Fix > * [#396](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/396) Component and their templates should be normalized the same. ([@​rwjblue](https://github.com/rwjblue)) > > #### Committers: 1 > - Robert Jackson ([@​rwjblue](https://github.com/rwjblue)) > ></tr></table> ... (truncated) </details> <details> <summary>Changelog</summary> *Sourced from [ember-resolver's changelog](https://github.com/ember-cli/ember-resolver/blob/master/CHANGELOG.md).* > ## v7.0.0 (2019-12-18) > > #### 💥 Breaking Change > * [#452](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/452) Remove dead module unification code ([@​stefanpenner](https://github.com/stefanpenner)) > > #### 🚀 Enhancement > * [#450](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/450) remove now defunct v8 optimization ([@​stefanpenner](https://github.com/stefanpenner)) > > #### 🐛 Bug Fix > * [#475](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/475) Fix babel-plugin-debug-macros warning ([@​hjdivad](https://github.com/hjdivad)) > > #### Committers: 2 > - David J. Hamilton ([@​hjdivad](https://github.com/hjdivad)) > - Stefan Penner ([@​stefanpenner](https://github.com/stefanpenner)) > > ## v6.0.2 (2019-12-18) > > * Re-release v6.0.0, to avoid SemVer issue with removal of module unification support within 6.x. > > ## v6.0.1 (2019-12-18) > > #### 💥 Breaking Change > * [#452](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/452) Remove dead module unification code ([@​stefanpenner](https://github.com/stefanpenner)) > > #### 🚀 Enhancement > * [#450](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/450) remove now defunct v8 optimization ([@​stefanpenner](https://github.com/stefanpenner)) > > #### 🐛 Bug Fix > * [#475](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/475) Fix babel-plugin-debug-macros warning ([@​hjdivad](https://github.com/hjdivad)) > > #### Committers: 2 > - David J. Hamilton ([@​hjdivad](https://github.com/hjdivad)) > - Stefan Penner ([@​stefanpenner](https://github.com/stefanpenner)) > > ## v6.0.0 (2019-11-19) > > #### 💥 Breaking Change > * [#449](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/449) Upgrade deps and drop node 6 support ([@​stefanpenner](https://github.com/stefanpenner)) > > #### Committers: 1 > - Stefan Penner ([@​stefanpenner](https://github.com/stefanpenner)) > > ## v5.2.1 (2019-08-09) > > #### 🐛 Bug Fix > * [#396](https://github-redirect.dependabot.com/ember-cli/ember-resolver/pull/396) Component and their templates should be normalized the same. ([@​rwjblue](https://github.com/rwjblue)) > > #### Committers: 1 > - Robert Jackson ([@​rwjblue](https://github.com/rwjblue)) > ></tr></table> ... (truncated) </details> <details> <summary>Commits</summary> - [`9593829`](ember-cli/ember-resolver@9593829) 7.0.0 - [`be2c61a`](ember-cli/ember-resolver@be2c61a) Add v7.0.0 to CHANGELOG.md. - [`8f3c5fd`](ember-cli/ember-resolver@8f3c5fd) Add v6.0.2 to CHANGELOG.md. - [`5f07661`](ember-cli/ember-resolver@5f07661) Bump resolve from 1.13.1 to 1.14.0 - [`abbbd08`](ember-cli/ember-resolver@abbbd08) Release 6.0.1 - [`6073445`](ember-cli/ember-resolver@6073445) Add automated release setup. - [`e68934d`](ember-cli/ember-resolver@e68934d) Merge pull request [#475](https://github-redirect.dependabot.com/ember-cli/ember-resolver/issues/475) from ember-cli/hjdivad/remove-warnings - [`27e393f`](ember-cli/ember-resolver@27e393f) Fix babel-plugin-debug-macros warning - [`d948272`](ember-cli/ember-resolver@d948272) Bump @ember/optional-features from 1.1.0 to 1.2.0 - [`37dba53`](ember-cli/ember-resolver@37dba53) Bump eslint-plugin-ember from 7.7.1 to 7.7.2 - Additional commits viewable in [compare view](ember-cli/ember-resolver@v4.2.4...v7.0.0) </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=ember-resolver&package-manager=npm_and_yarn&previous-version=4.2.4&new-version=7.0.0)](https://dependabot.com/compatibility-score.html?dependency-name=ember-resolver&package-manager=npm_and_yarn&previous-version=4.2.4&new-version=7.0.0) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in the `.dependabot/config.yml` file in this repo: - Update frequency - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details>
Right now, https://crates.io/search?q=mmap&sort=downloads looks like this to me:
Either this is wrong, or I've taken a serious blow to the head and can't ordering anymore.
The text was updated successfully, but these errors were encountered: