Hi Erick,

I'm on Solr 8.6.1.  I did further debugging into this and just noticed that
my search is not working too now (this is after I changed the request
handler name from "select" to "select_cpsearch").  I have this very basic
test code as a test which I think revailes the issue:

    try
    {
        SolrClient solrClient = new HttpSolrClient.Builder("
http://testserver-dtv:8984/solr/cpsearch/select_cpsearch";).build();
        SolrQuery query = new SolrQuery();
        query.set("q", "*");
        QueryResponse response = solrClient.query(query);
    }
    catch (Exception ex)
    {
        ex.printStackTrace();  // has this:
"<tr><th>URI:</th><td>/solr/cpsearch/select_cpsearch/select</td></tr>"
    }

In the stack, there is this message (I'm showing the relevant part only):

    <title>Error 404 Not Found</title>
    </head>
    <body><h2>HTTP ERROR 404 Not Found</h2>
    <table>
    <tr><th>URI:</th><td>/solr/cpsearch/select_cpsearch/select</td></tr>

As you can see "select" got added to the URI.  I think this is the root
cause for the ping issue too that I'm having, but even if it is not, I have
to fix this search issue too but I don't know how to tell SolrJ to use my
named search request handler.  Any ideas?

Thanks.

Steven


On Fri, Sep 18, 2020 at 2:24 PM Erick Erickson <erickerick...@gmail.com>
wrote:

> This looks kind of confused. I’m assuming what you’re after is a way to get
> to your select_cpsearch request handler to test if Solr is alive and
> calling that
> “ping”.
>
> The ping request handler is just that, a separate request handler that you
> hit by going to
> http://sever:port/solr/admin/ping.
>
> It has nothing to do at all with your custom search handler and in recent
> versions of
> Solr is implicitly defined so it should just be there.
>
> Your custom handler is defined as
> <requestHandler name="/select_cpsearch" class="solr.SearchHandler”>
> presumably in some collection called “cpsearch”?
>
> yet your URL is solr/cpsearch. It should be something like
> …solr/cpsearch/select_cpsearch…
>
> The “qf” parameter is part of the (e)dismax query parser which it doesn’t
> look like you’re using.
>
> So let’s back up a bit and state, at a high level, what you want to
> accomplish.
>
> First, what version of Solr? in recent Solr versions.
>
> Then the full definition of your custom request handler.
>
> Then an example of exactly how you try to get to it from a browser
> ‘cause that’s easier to try to reproduce than SolrJ.
>
> Best,
> Erick
>
> > On Sep 18, 2020, at 12:53 PM, Steven White <swhite4...@gmail.com> wrote:
> >
> > <requestHandler name="/select_cpsearch" class="solr.SearchHandler">
>
>

Reply via email to