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

General Search Box #79

Open
gbaz opened this issue Feb 16, 2015 · 5 comments
Open

General Search Box #79

gbaz opened this issue Feb 16, 2015 · 5 comments

Comments

@gbaz
Copy link

gbaz commented Feb 16, 2015

Coming off an email suggestion, imagine a search button in the top right. It first navigates through page in the app, and brings up a list of that content. Then, it also falls through to a wiki search, and brings in a list of wiki pages. And perhaps it can realize you typed a function signature and fall through to a hoogle or hayoo search. And a hackage search too.

Doing these "omnisearch" things is an art. But if you have a good one, it quickly becomes very addictive!

@chrisdone
Copy link
Member

As written here:

Generally, I’m not sure why sites bother with search boxes. Unless they’re implementing code-aware searches, Google will be faster and more accurate every time. As Joel Spolsky says of his StackOverflow, Google is the user interface to SO.

Examples:

  • I go to python.org and in the search box put "s-expression" => no results found. In my browser's address bar I type "python s-expression" and the first result is the library I wanted.
  • I type javascript because I want the obvious post on that into wiki.haskell.org I get this. I type haskell javascript in Google and I get the expected page.
  • If I want the text package I just type hackage text in my browser bar and there it is.
  • Google also shows results of useful things that our hypothetical service doesn't know about.

Given the engineering work involved to make something worth having, and the fact Google already exists, the UI space and user choice problem introduced, it ought to be a very good search that indexes in a way Google cannot or something.

That said, an update to hoogle that searches e.g. all of Hackage including docstrings, readme files, etc. and source code search a la Google Code Search would be very handy and something Google cannot do, but perhaps orthogonal to this issue.

@gbaz
Copy link
Author

gbaz commented Feb 16, 2015

At a minimum, how about a google search box that limits to being across various haskell.org domains? :-P

(I agree that it is a lot of engineering work to make a good thing. I know some people that worked on a team to do so for a commercial site. It is also why I have some ideas about how it could be feasible :-))

@ndmitchell
Copy link

One approach, which might give good-payoff low-effort, would be a textbox which does Hoogle completions as you type, and Google search when you hit enter. For the "as you type" thing I'd envisage see http://community.haskell.org/~ndm/shake/, the textbox in the top right - type something like shake to see it start to search. Then people could arrow-down and select the function they're after if they want to go straight to a function, or press enter to do a Google search. Adding a first completion being "search only Hackage functions with Hoogle" as the first item in the drop down might make it less surprising.

I suspect that writing something that indexes all of the Haskell domains, and picks the best result using sensible weighting is going to be worse than Google. There's very little way to do things like incoming link weighting unless you spider the whole web at the same time.

@mwm
Copy link

mwm commented Mar 25, 2015

Note that the reason that "s-expression" doesn't find anything on the Python site web search is because the answers you get from google aren't on the python site. They are other people's libraries. This is actually a feature: The python site provides documentation on a blessed set of libraries, and there isn't a blessed s-expression parser. If you go to PyPI (Python's version of Hackage) and do the search there, you get a selection of s-expression libraries (none of which are what you want, probably).

Likewise, if you do a search for "random" on the front page, you get a different set of results than if you do if you search the library documentation. In this case, using "python random" in google arguable does the right thing, in that it returns a link to an old version of the library doc page.and then blogs/SO/etc. that deal with generating random numbers in python.

The closest thing Haskell has to such a library set is the packages in haskell platform, though that's clearly debatable. I believe we should provide some kind of search for that, and have opened issue #104 for that.

@chrisdone
Copy link
Member

It's not really a feature, it just shows that the feature is useless compared to regular google.

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

No branches or pull requests

4 participants