florish

florish

HexDocs Search - find function, type and callback documentation for (almost) all hexdocs.pm packages

! Update: HexDocs Search is no longer available, please see this message for more information !

Hi! Over the last weeks, we have been working on HexDocs Search, a cross-package function/type/callback documentation search interface containing data for (almost) all packages currently on hexdocs.pm.

To give it a try, visit hexdocs.pandosearch.com and just start typing.

Why this project?

We are Pandosearch, a Dutch company offering search engines for websites and web applications. We have been working with Elixir since 2018 and love the language and its ecosystem.

We regularly try to give back by contributing to Elixir open source projects, but felt we could do more.

Seeing a community need for cross-package HexDocs search, we thought: this is our call!

What can be found?

HexDocs Search currently contains around 433K functions, types and callbacks. Most HexDocs packages are included, but not all. See “Known limitations” for more details on this.

How is data collected?

We collect data by crawling hexdocs.pm twice a day. We use the root sitemap.xml index file on hexdocs.pm as a starting point and use all the URLs found there.

The lastmod values from the XML sitemaps are used to ensure we only recrawl changed pages. This enables us to do a full recrawl in less than ten minutes. This strategy also has the added benefit of avoiding massive request loads on hexdocs.pm.

Project status

The current project status is probably best described as “beta”. Response times should be quick and the project should generally be up 24/7, but we are still actively working on some details, so a bit of downtime is to be expected every once in a while.

Feedback wanted!

Our first goal after posting this announcement is to gather feedback from the community. This means we need you, as you are probably an Elixir developer reading this!

Any feedback is greatly appreciated. If possible, just use this forum thread, but you can also send a private message if deemed more appropriate. We’ll get back to you as quickly as possible.

Future plans

A few days before posting this announcement, we’ve offered @josevalim early access to gather some initial feedback. Reason for contacting him was this recently added GitHub issue, which outlines a set of features similar to what our project aims to offer.

We are currently in the process of determining if (parts of) HexDocs Search could be integrated into ExDoc/HexDocs for cross-package search. As the outcome of this process is still highly uncertain, José encouraged us to wait no longer and go live with what we have right now. In other words: here we are :).

For future features, we are very much open to suggestions, as our main goal is to maximize value to the community. As such, we deliberately do not have a fixed feature roadmap right now.

Known limitations

No module documentation and non-module pages included yet

We deliberately decided to limit our scope to function/type/callback documentation for now. This means no module documentation, guides and/or other ExDoc-generated HTML pages are included in the results yet.

An important reason for this is that in contrast to single-package search, including these content types for all of HexDocs is quite challenging in terms of correctly ranking and identifying search results.

In addition, due to the more free-form nature of ExDoc guide pages and module documentation, there aren’t any hard guarantees about the exact structure of the HTML output, especially as Markdown also allows raw HTML to be used. This gives us some additional challenges when crawling and rendering these types of content.

Only ExDoc 0.20.0 and up

Due to ExDoc HTML changes over the year, searchable content is limited to HTML generated by ExDoc versions starting from v0.20.0 (released April 2, 2019). In case your package is missing, update your ExDoc dependency version before releasing a new package version. Our crawler should pick up the newly generated documentation within 24 hours.

iframe documentation rendering

Also due to ExDoc HTML/CSS changes over the years, documentation HTML is loaded in an <iframe> using the original hexdocs.pm CSS. In most cases, this ensures styling is the same as on hexdocs.pm, but some edge cases may have some minor rendering issues.

Note that JavaScript used on hexdocs.pm is not loaded in the <iframe> at all. Main reason is that we are only rendering parts of the original hexdocs.pm HTML layout, which would cause JavaScript element selectors to raise exceptions due to certain elements not being present on the page.

Limited dark/light mode support

Dark and light mode are supported, but only based on system preferences. Manually selected theme preferences set on hexdocs.pm cannot be respected due to localStorage being scoped to a domain.

That’s it for now. Looking forward to your feedback!

– Edward (@edwardsmit), Roeland (@roeland) and Floris (@florish)

Most Liked

josevalim

josevalim

Creator of Elixir

Hi @KristerV, yes, we are working on providing the same officially on HexDocs and we are already indexing the packages. More information here: New HexDocs home page · Issue #49 · hexpm/hexdocs · GitHub

I’d have been clearer before but I got confused and I thought you and @florish’s were working on the same project, so I thought you were aware. It took me to read this comment to realize they were two different implementations. Apologies.

KristerV

KristerV

happy to see another entry in cross-package search, since my hexdocs.krister.ee is buggy and has problems (usage seems very low so no motivation to deal with other usecases).

I’m quite used to searching for guides and whatever titles are in the hexdocs already so it’s too bad you’re not indexing that. plus the results aren’t really as readable as I would like them to be (hexdocs.pm does that pretty well, it’s why I copied them). so I guess I’ll just stick to using my own tool for now. will keep an eye on this though.

josevalim

josevalim

Creator of Elixir

Thanks. Note we have been discussing this for more than a year and progress has been slow, partly because we did a scope creep at the beginning, so it is good you haven’t waited for us. I am sure the community can benefit from a solution until we deliver something (and hopefully we will). But if you want, you can already start using our TypeSense API for queries, so you don’t have to index it. Your call!

Where Next?

Popular in Announcing Top

josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19228 141
New
deadtrickster
I’ve just released stable versions of my Prometheus Elixir libs: Elixir client [docs]; Ecto collector [docs]; Plugs instrumenter/Export...
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: GitHub - devonestes/assertions: Helpful a...
New
bryanjos
Hi, I just published version 0.23.0 of Elixirscript. https://github.com/bryanjos/elixirscript/blob/master/CHANGELOG.md Most of the chan...
New
riverrun
I’ve just released version 3 of Comeonin, a password hashing library. The following small changes have been made: changes to the NIF c...
New
kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
Crowdhailer
Experimenting with this code. OK.try do user &lt;- fetch_user(1) cart &lt;- fetch_cart(1) order = checkout(cart, user) save_orde...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
scohen
Lexical Lexical is a next-generation language server for the Elixir programming language. Features Context aware code completion As-you...
New
anshuman23
Hello all, I have been working on my proposed project called Tensorflex as part of Google Summer of Code 2018.. Tensorflex can be used f...
New

Other popular topics Top

lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
Qqwy
Update: How to use the Blogs &amp; Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New

We're in Beta

About us Mission Statement