You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Danesh Kuruppu <dk...@gmail.com> on 2015/01/07 09:58:52 UTC

Solr support for multi-tenant applications

Hi all,

I need to use solr for multi-tenant application. What is the best way I
could achieve multi tenancy with solr?

One possibility is to have separate core for each tenant domain.

   1. Is it recommended to do it?
   2. Are there any issues with have a large number of Solr Cores?

Please suggest.

Thanks

Danesh

Re: Solr support for multi-tenant applications

Posted by Jack Krupansky <ja...@gmail.com>.
Indeed, it is all about the numbers. So, Danesh, what are your numbers -
number of tenants and number of documents per tenant. What is the expected
distribution curve of documents per tenant?

The only "limit" I would suggest is that you not have more than "low
hundreds" of cores/tenants.

Will tenants be directly accessing Solr, or will you provide them with a
REST API for an application layer that intermediates access to Solr?

-- Jack Krupansky

On Wed, Jan 7, 2015 at 4:31 AM, Bram Van Dam <br...@intix.eu> wrote:

> One possibility is to have separate core for each tenant domain.
>>
>
> You could do that, and it's probably the way to go if you have a lot of
> data.
>
> However, if you don't have much data, you can achieve multi-tenancy by
> adding a filter to all your queries, for instance:
>
> query = userQuery
> filterQuery = tenant:currentTenant
>
>  - Bram
>

Re: Solr support for multi-tenant applications

Posted by Bram Van Dam <br...@intix.eu>.
> One possibility is to have separate core for each tenant domain.

You could do that, and it's probably the way to go if you have a lot of 
data.

However, if you don't have much data, you can achieve multi-tenancy by 
adding a filter to all your queries, for instance:

query = userQuery
filterQuery = tenant:currentTenant

  - Bram