lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnold Bronley <arnoldbron...@gmail.com>
Subject Re: Accessing other core in SolrCloud mode
Date Mon, 06 Jan 2020 21:58:40 GMT
Hi Erick,

Thanks for replying. I know that I should deal at collection level in
SolrCloud mode and leave dealing with cores to SolrCloud. I am also aware
of collection aliasing feature.

However, the plugins that I am trying to migrate to SolrCloud have some
usecases like following:
1. One of the plugins requires other core so that it can fetch some data
from it. This data gets used in pre-indexing phase for the main core. This
plugin gets invoked during the pre-indexing phase of the main core.
2. One other plugin requires some other cores so that it can execute
MoreLikeThis queries against them (MoreLikeThis like method returns Lucene
Query object so I assume that it does not work at Solr collection level but
at Solr core level unless we convert it to SolrQuery object somehow and
execute it through some Solr client)

On Mon, Jan 6, 2020 at 3:28 PM Erick Erickson <erickerickson@gmail.com>
wrote:

> This kind of seems like an XY problem. Why do you want to get to the other
> core?
> If you need to run the same query on multiple cores… you shouldn’t be
> thinking
> that way, think “collections” rather than cores. And you can use
> “collection aliasing”
> (see the Collections API CREATEALIAS command) to alias to multiple
> _collections_.
> The rest is automatic.
>
> If that’s irrelevant, please tell us _why_ your custom code needs to
> access otherCore,
> maybe there’s something built in. It’s just that much of the time trying
> to force
> stand-alone logic on SolrCloud is making it harder than it needs to be.
>
> Best,
> Erick
>
> > On Jan 6, 2020, at 2:39 PM, Arnold Bronley <arnoldbronley@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I have one custom Solr plugin that uses following logic to access some
> > other core present on the same Solr instance.
> >
> > request.getCore().getCoreContainer().getCore(otherCoreName) where request
> > is an object of type SolrQueryRequest
> >
> > This works fine in master-slave mode.
> >
> > Now if try to use the same logic in SolrCloud mode, it does not work
> > because what was the core name above is a collection name now and core
> > name is something like otherCoreName_shard1_replica_n1. There is also a
> > possibility that the the core might be sharded in SolrCloud mode and it
> > partially exists on two or more separate Solr instances.
> >
> > How would I change above logic for accessing other Solr core so that it
> > works in SolrCloud mode?
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message