Skip to content
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

Use grep metacpan for distro search #1991

Merged
merged 1 commit into from
Nov 17, 2017

Conversation

atoomic
Copy link
Member

@atoomic atoomic commented Nov 17, 2017

note that grep.metacpan is only going to perform
the search for the last available version of
the distribution.

Left bar search inside a distro

Results in grep.metacpan

@@ -35,8 +35,9 @@
</button>
</li>
<li>
<form action="/search">
<input type="hidden" name="q" value="dist:<% release.distribution %>">
<form action="http://grep.metacpan.org/search">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be https.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to https, was not sure it was available :-)

@oalders
Copy link
Member

oalders commented Nov 17, 2017

My concern here is that this may end up being confusing for users. To start with, I think I'd prefer having a search in dist + a grep in dist link. There's room for it in the UI. The grep link could use the magnifying glass icon to make it consistent.

Consider (bad example) some search like https://metacpan.org/search?q=dist:DateTime-Format-MySQL+datetime%20format%20mysql

Inside the dist, it returns at least one useful result. On the grep app, it will return nothing (if I got the query correct): https://grep.metacpan.org/search?q=datetime+format+mysql&qd=DateTime-Format-MySQL&qft=

So, I think that a full text search won't always translate well to a grep. It would be nice to have both options at least to start with and people could let us know if we should drop the old one or continue on with it.

@atoomic
Copy link
Member Author

atoomic commented Nov 17, 2017

thanks for the feedback, I will adjust the [minor] changes in that direction
I've checked and it appears that grep is right to display no result for "datetime format mysql" as this is not used anywhere in the source code for the DateTime-Format-MySQL distro

@atoomic
Copy link
Member Author

atoomic commented Nov 17, 2017

@oalders I've updated the PR as suggested. But I've discarded adding the fa search icon to the placeholder, as this requires changing the font-family for this input search and looks awkward when compare side/side

Dual search in Tools

@oalders
Copy link
Member

oalders commented Nov 17, 2017

Could you rebase this branch and also change Grep to lower case? At that point, I think we're in good shape. We could add a grep link to the search results as well in a different pull request.

Provide an alternate search option from the left
menu bar, to use grep.metacpan.

note that grep.metacpan is only going to perform
the search for the last available version of
the distribution.
@atoomic
Copy link
Member Author

atoomic commented Nov 17, 2017

@oalders rebased and change Grep to grep

@oalders
Copy link
Member

oalders commented Nov 17, 2017

Thanks! Build failure is unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants