lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <markus.jel...@openindex.io>
Subject RE: SolrClient from inside processAdd function
Date Wed, 04 Sep 2019 19:07:48 GMT
Hello Arnold,

Yes, we do this too for several cases.

You can create the SolrClient in the Factory's inform() method, and pass is to the URP when
it is created. You must implement SolrCoreAware and close the client when the core closes
as well. Use a CloseHook for this.

If you do not close the client, it will cause trouble if you run unit tests, and most certainly
when you regularly reload cores.

Regards,
Markus

 
 
-----Original message-----
> From:Arnold Bronley <arnoldbronley@gmail.com>
> Sent: Wednesday 4th September 2019 20:10
> To: solr-user@lucene.apache.org
> Subject: Re: SolrClient from inside processAdd function
> 
> I need to search some other collection inside processAdd function and
> append that information to the indexing request.
> 
> On Tue, Sep 3, 2019 at 7:55 PM Erick Erickson <erickerickson@gmail.com>
> wrote:
> 
> > This really sounds like an XY problem. What do you need the SolrClient
> > _for_? I suspect there’s an easier way to do this…..
> >
> > Best,
> > Erick
> >
> > > On Sep 3, 2019, at 6:17 PM, Arnold Bronley <arnoldbronley@gmail.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > Is there a way to create SolrClient from inside processAdd function for
> > > custom update processor for the same Solr on which it is executing?
> >
> >
> 

Mime
View raw message