I have a SolrJ application that uses the core admin as well as doing queries against each core. I have an object of my own design for each core that uses SolrJ directly. Two of my core objects (one for build and one for live) are used in an object that represents a shard, and multiple shard objects are used in an object that represents an entire index chain.

Within the core object, I am currently creating two solr server objects. One has the URL ending in "/solr" and is used for CoreAdminRequest. The other includes the core name and is used for updates/queries. I have taken steps to share the first server object between core objects when the host and port are the same.

My question - could I use one server object for both of these, or am I doing things correctly? I guess it comes down to whether or not there is any way to specify a core when doing queries or updates. I have not been able to see a way to do it. If there is a way, I could reduce the number of server objects that my program uses.

Currently there are two index chains, each of which has seven shards. With two cores per shard, the program builds 28 server objects for queries. Since I have four servers, I also end up with four shared server objects for CoreAdminRequest. If there's a way to specify the core for queries, I would only need those four shared objects. If such a capability doesn't already exist, should I file a jira issue?

Thanks,
Shawn

Reply via email to