Display autocomplete in OpenSearch Suggestions format #200

SineSwiper opened this Issue Apr 27, 2012 · 10 comments


None yet
6 participants

Now that autocomplete support is available, the next logical step would be to make sure that it can spit out its autocomplete hints in OpenSearch Suggestions format. This can then be included into the OpenSearchDescription XML for MetaCPAN.

Example: http://api.metacpan.org/search/autocomplete?q=Meta

This would look like:


rwstauner commented Apr 29, 2012

Is this the same as cpan-api/metacpan-web#434 ?

Yes, but why was the original case closed?

it was somehow closed automatically. i am not aware that i closed the issue


oalders commented May 1, 2012

IIRC there was some conversation about how many output formats we wanted to support and whether this would better be provided as some external wrapper around the API. Having said that, I'm happy to revisit this.

Why have an external wrapper around the API when you are using a Catalyst MVC model? MVC makes it easy to just create a new View with the different format. Besides, I don't see this particular format being used for anything except search suggestions (ie: only for /search/autocomplete), as that is what the format is designed for.


oalders commented May 2, 2012

Right. I don't think there's a lot of overhead involved adding another output format, so I'm in favour of it. @monken?


monken commented May 15, 2012

Why do you link to https://metacpan.org/search?q=meta instead https://metacpan.org/module/meta?
Since you already selected the exact name of the module, you could as well just go to the selected module and not the search results.

No reason except copypasta. The existing OpenSearch (sans autocomplete) is already going directly to the module, so /module/meta would work fine.

I would add that non-module matches (like "askndiawr", which doesn't actually find anything) should still go to the search?q= version, though. I think that works as-is, though, since the OpenSearchDescription (not the autocomplete) is already doing that.


ranguard commented Nov 13, 2014

No one stepped forward to do this - Closing as part of Nov 2014 cleanup

@ranguard ranguard closed this Nov 13, 2014

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