3

I am upgrading a Solr 4 server to Solr 8, and one issue I found is the format of solr.xml changed and I can no longer specify <cores defaultCoreName='collection1'>... - this leads to having to specify the core name in the URL's to search, dataimport etc. when in the old SOLR 4 the users didn't have to.

Is there a way to specify the default core in SOLR 8 for the purposes of defaulting the URL's not having that core to defaulting to it?

Andrey
  • 20,487
  • 26
  • 108
  • 176
  • I don't think so (but I could be wrong!). There were a lot of features introduced since Solr 4, ie. like making 'SolrCloud' mode a default in order to make Solr more straight forward in handling single vs multiple core/collections regardless of the (single vs multiple) server configuration. That's why I think it's not possible anymore to name a default core as it was possible before. That said, it might be possible at the request handler level to select a default core if none is given in the url. – EricLavault Jan 09 '20 at 11:25
  • @EricLavault - could you please elaborate on your last sentence re. selecting a default core at the request handler? Did you mean I should be writing my own request handler implementation? – Andrey Jan 09 '20 at 20:24
  • Yes merely, but in fact it would make more sense to do this earler at a higher level when the request is parsed (ie. solr requestParsers [add default core naming fallback] > requestDispatcher > requestHandler) – EricLavault Jan 10 '20 at 07:45
  • @EricLavault where does top level request parsing happen? I couldn't find a class or a setting to overwrite – Andrey Jan 10 '20 at 22:38
  • I'm not sure I can help on where exactly to look at / what class should be overwritten, I don't want to mislead you, just to make you think that it would be worth digging into that direction. Maybe you would have better advice from the solr mailing list. Also on the other hand, if you don't have any time for this, you should consider using some kind of redirection for the urls involved in search, import and so on.. in your application, using a reverse proxy for example. – EricLavault Jan 11 '20 at 09:06

1 Answers1

1

No, the concept of a "default core" has been removed, as early as Solr 5.

There are no longer direct references to a default core setting, but you can still come across some ancient texts hinting at its removal:

...the concept of default update URL is almost gone (Apache JIRA)

Ishmaeel
  • 14,138
  • 9
  • 71
  • 83