Open evanlenz opened 12 years ago
It would be great if this wildcarded on a single word (including dashes and colons) to list all function names that match....
By way of implementation, I would probably insert a branch into the URL rewriter (/apidoc/controller/url_rewrite.xqy) after the one that checks for matching functions (by checking the range index of local names). When an exact match is not found, we'd return a 404 page but we'd also call a new function (perhaps similar to get-matching-functions()) which queries against the same index (for function names) and which rather than looking for an exact match looks for a wildcard match. This is what Danny's docapp did previously. The only difference here is that we only redirect directly to the page when there's an exact match, whereas wildcard matches get listed as suggestions in the 404 page.
In addition to wildcards, it might also be good to incorporate spelling suggestions (for when people mis-type or misspell part of the function name).
So for example, if I type http://docs.marklogic.com/element-value, it would return a 404, but on that error page it would also list these search results: http://developer.marklogic.com/search?q=element-value (without changing the URL)