Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
correct the autocomplete query + test (WIP, see #470)
  • Loading branch information
mickeyn committed May 4, 2016
1 parent e4c856e commit 6d8a097
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Document/File/Set.pm
Expand Up @@ -388,7 +388,7 @@ sub autocomplete {
}
}
}
)->sort( [ '_score', 'documentation' ] );
)->sort( [ '_score', 'module.name.lowercase' ] );
}

__PACKAGE__->meta->make_immutable;
Expand Down
4 changes: 2 additions & 2 deletions t/server/controller/search/autocomplete.t
Expand Up @@ -23,12 +23,12 @@ test_psgi app, sub {
Multiple::Modules::A
Multiple::Modules::B
Multiple::Modules::RDeps
Multiple::Modules::Tester
Multiple::Modules::RDeps::A
Multiple::Modules::RDeps::Deprecated
Multiple::Modules::Tester
)
],
'results are sorted by module name length'
'results are sorted lexically by module name + length'
or diag( Test::More::explain($got) );
}
};
Expand Down

0 comments on commit 6d8a097

Please sign in to comment.