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

Run exact match search by default but add button to extend it #126

Merged
merged 15 commits into from Mar 31, 2015

Conversation

pypingou
Copy link
Member

By default anitya will now do exact match searches on project and package name.
If there is only one result, the user will be redirected to its page.

If there are more than one result, the user will be presented with a button entitled Extend offering the possibility to extend the search.

@pypingou
Copy link
Member Author

Fixes #43

@ralphbean
Copy link
Contributor

If there are more than one result, the user will be presented with a button entitled Extend offering the possibility to extend the search.

If you know that there is more than one result, then we have already done the search. I don't understand why we don't just include those results in the first page instead of asking the user to do a second operation and click 'Extend'.

@ralphbean
Copy link
Contributor

I can't think of another UI that has a search field that returns only exact matches by default, but then requires you to click an extend button to resubmit the search... to actually search.

I had a proposal in IRC to implement this by: making two subsequent queries -- one for exact matches, and one by a pattern -- and to return those two lists concatenated together as the results. It covers all use cases I can think of with simpler interactions on the user's part. Is there something wrong with this approach?

@pypingou
Copy link
Member Author

If you know that there is more than one result, then we have already done the search. I don't
understand why we don't just include those results in the first page instead of asking the user to do a
second operation and click 'Extend'.

Search for arr might return you several results, but you will get even more if you search for arr* or *arr*.

@pypingou
Copy link
Member Author

I had a proposal in IRC to implement this by: making two subsequent queries -- one for exact matches, and one by a pattern -- and to return those two lists concatenated together as the results. It covers all use cases I can think of with simpler interactions on the user's part. Is there something wrong with this approach?

Well it does not solve the original question from @glensc on #43. It makes it easier to get the results but not able to do exact match.

@ralphbean
Copy link
Contributor

He didn't say that he wanted to be redirect directly to what he wanted. He only said that he

wanted to search for "ruby" package (the ruby language)

It does solve the problem because it puts the exact match first in the list where it is obvious and easy to click on. If a user searches for 'nethack', then the nethack package ought show up first.. but it seems incorrect to me to ask the user to click an Extend button to also get the 'nethack-vultures' package to show up. If they knew very precisely that they wanted to go directly to the 'nethack' package, they could have just typed it into the URL and not bothered searching to begin with.

Furthermore, the logic as currently implemented in this changeset where " If there is only one result, the user will be redirected to its page." makes it odd for novice users to search for all things with "ruby". They'll go to search and type 'ruby' and then be redirected away from the search interface and over to the project for the ruby core project. They'll have to know about the extended syntax.. go back to the search interface and type it again with "ruby".

If I go to most any other search interface out there on the internet (google, fedora-packages, etc..) and type 'ruby' I don't get back things that only exactly match 'ruby'. I get first things that exactly match 'ruby' but then also things later in the results that have the string 'ruby' in them somewhere (i.e., rubygems-this and rubygems-that).

The approach as implemented here exposes implementation details about the underlying database to the user and asks them to adapt their behavior to that layer, instead of providing a search interface that is more familiar and has more in common with most other search interfaces.

@ralphbean
Copy link
Contributor

👍 Thanks Pierre!

@pypingou
Copy link
Member Author

Thanks @ralphbean

pypingou added a commit that referenced this pull request Mar 31, 2015
Run exact match search by default but add button to extend it
@pypingou pypingou merged commit cd89737 into master Mar 31, 2015
@pypingou pypingou deleted the exact_match branch March 31, 2015 19:00
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.

None yet

2 participants