Alan Woodward created SOLR-6901:
-----------------------------------
Summary: Rethink EmbeddedSolrServer CoreContainer use
Key: SOLR-6901
URL: https://issues.apache.org/jira/browse/SOLR-6901
Project: Solr
Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
This was originally going to be about removing the EmbeddedSolrServer
constructor that takes a SolrCore, which has been deprecated since at least
2010 (!). Digging around a bit, though, it seems that having a CoreContainer
reference in ESS isn't very useful, especially as we only allow querying a
single core from it.
What it *does* allow you to do is to send CoreAdminRequests, but again most of
these are not useful for a single core.
I don't really have a strong opinion here, other than that we shouldn't carry a
Deprecated annotation across a third (!) major release.
* Simplest option is to just nuke that constructor (it's currently used in a
single test, which can be re-written).
* Another option would be to 'undeprecate' it, and simply disallow core admin
requests if coreContainer is null
* Yet another possibility is to stop holding on to the CoreContainer reference,
and instead have a custom CoreAdminHandler that only works for commands that
'make sense' for a single core (essentially, RELOAD and STATUS) and returns the
SolrJ equivalent of an UnsupportedOperationException for everything else.
I'm leaning mostly to option 2 at the moment, because I think an embedded
client that takes a single core is a very useful abstraction (could be a nice
way of short-circuiting local requests in ShardHandler, for example).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]