You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2013/01/24 01:21:13 UTC

[jira] [Commented] (SOLR-4173) SolrJ API base URL returns 404 - print helpful message instead

    [ https://issues.apache.org/jira/browse/SOLR-4173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561265#comment-13561265 ] 

Hoss Man commented on SOLR-4173:
--------------------------------

was chatting with steffkes about this a bit on IRC, my suggesting would be to modify SolrDispatchFilter such that:

 * If a valid core is found, AND
 * If there is no handler path specified (ie: "" or "/", not "/bogus" which the core says isn't registered to anything)

Then redirect the request to "/webappname/#/corename" (ie: the main view of that core in the admin UI).   Alternatively, if we really want to give the user a "you are miss-using the SolrJ URL" yep screen, then redirect to "/webappname/#/corename/access_url" and implement that as a new HTML/jquery/whatever screen.

The place to put this redirect would be somewhere arround L229 of SolrDispatchFilter...

{noformat}
          // Determine the handler from the url path if not set
          // (we might already have selected the cores handler)
          if( handler == null && path.length() > 1 ) { // don't match "" or "/" as valid path
{noformat}
                
> SolrJ API base URL returns 404 - print helpful message instead
> --------------------------------------------------------------
>
>                 Key: SOLR-4173
>                 URL: https://issues.apache.org/jira/browse/SOLR-4173
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>    Affects Versions: 4.0
>            Reporter: Shawn Heisey
>            Priority: Minor
>             Fix For: 4.2, 5.0
>
>
> If you put the URL that's correct for an API like SolrJ into a browser, you get a 404 error.
> It would be really helpful if it were to instead display a helpful message letting a user know that they have accessed the core's base URL, which is only useful in API calls.
> It should offer a link with its own URL as a handy place to right-click & copy.  That self-link should either have or not have the trailing slash, according to what is the current recommended practice.  Side note: I do include the trailing slash in my SolrJ URLs.
> The message should probably also offer a link back to the admin GUI page for that core, and any other links that people might find useful.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org