I have a SolrCloud collection set up with multiple request handlers and I would like to access a non-default request handler called /all
which is defined in solrconfig.xml. This handler works fine when I search from the browser:
However, when I search from SolrJ using SolrQuery.setRequestHandler("all")
, I get 0 results. SolrJ just puts a qt=/all
into the query, so these are the browser results of the same query (SolrJ gets the same thing):
The same behavior is observed for all of our other handlers. If a handler is not defined, Solr throws a different error if there is a leading '/' or defaults to select if there isn't a leading '/' so we know that isn't the problem.
So my question is, how can I get this to work in SolrJ? Select has the default settings in solrconfig.xml and it needs to stay the default handler. Searching around, the error seems to happen when there are duplicate IDs or the id field is not stored. But if this was the case, none of the searching should work so I think something else must be going on here.
Looks like the issue kind of just resolved itself. No changes were made but everything works properly now. We think there could have been some indexing going on in the background or maybe something happened with Solr itself. We may never know, but I am no longer able to reproduce the issue so I guess that works.
Thank you to everyone who tried to help.