CPAN-API/metacpan-web — Issue #370: Perform better on sub-words of full module name like search.cpan.org
Author: avar
Created: 2011-10-28 11:30:22+00:00
State: open

When I use search.cpan.org I tend to search for substrings of long modules that are easy to type, e.g. for these modules I might search for these strings:

Apache::Cookie -- apache cookie
POE::Component::IRC -- poe irc
Apache::Session::Generate::MD5 -- apache md5

On the first two examples search.cpan.org returns the module I'm looking for as the #1 hit, but metacpan doesn't.

I've worked with ElasticSearch but I'm unsure what the best rule would be to capture this. I think you currently search through:

Apache::Cookie
Apache-Cookie

So maybe it just needs a new tokenizer that lower cases and splits on non-word characters, i.e.:

apache cookie

But for the scoring I mainly want the most popular module matching this query, which is hard because metacpan.org doesn't really have popularity data.