lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Is SolrCloudClient Singleton Pattern possible with multiple collections?
Date Thu, 14 Jul 2016 18:26:09 GMT
bq:  if using the param "collection" is the same

Did you just try it? If so what happened?

Not sure what you're asking here. It's the name of the
collection you want to query against. It's only
necessary when you want to go against a
collection that isn't the default which you can set with
setDefaultCollection()

Best,
Erick

On Thu, Jul 14, 2016 at 10:51 AM, Pablo Anzorena
<anzorena.fing@gmail.com> wrote:
> I was using
> public QueryResponse query(ModifiableSolrParams params, METHOD method)
>
> And my actual code is parsing that object. I can change it to your method,
> but before that let me ask you if using the param "collection" is the same.
>
> Actually I am using the param "collection" only when I need to request to
> multiple collections.
>
> Thanks.
>
>
>
> 2016-07-14 14:15 GMT-03:00 Erick Erickson <erickerickson@gmail.com>:
>
>> Just use the
>>
>> public NamedList<Object> request(SolrRequest request, String collection)
>>
>> method on the SolrCloudClient?
>>
>> Best,
>> Erick
>>
>> On Thu, Jul 14, 2016 at 9:18 AM, Pablo Anzorena <anzorena.fing@gmail.com>
>> wrote:
>> > Hey,
>> > So the question is quite simple, Is it possible to use Singleton Pattern
>> > with SolrCloudClient instantiation and then reuse that instance to handle
>> > multiple requests concurrently accessing differente collections?
>> >
>> > Thanks.
>>

Mime
View raw message