If there is any way to get the size of the index of tenant in a collection 
where multiple tenants co-exist with composite id router scheme ,let me know
We need to somehow track the tenant's index size to see if it grows too big and 
document count is not proportional to index size in our case.

Thanks,
Rajeswari
 

On 4/5/21, 1:52 PM, "Natarajan, Rajeswari" <[email protected]> wrote:

    Thanks for your reply . We are looking for some strategy to add tenants in 
a collection. Initially we thought we will go with the
    number of documents. But we saw some tenants have less docs ,but their 
index size is more than the tenants having
    more documents, meaning the number of docs and index size is not 
proportional .  So we are looking to see if any way that exists to
    get the size of a tenant's index.

    Thanks,
    Rajeswari

    On 4/5/21, 1:35 PM, "Walter Underwood" <[email protected]> wrote:

        Some index structures are statistics of the entire index, so they don’t 
belong to one part of it.

        So the number you are asking for doesn’t exist. Lucene indexes don’t 
work like that. If you
        made an index with the documents from one tenant, it would not be the 
same size as the
        fraction of a shared index.

        Your best approach is to get the entire disk usage and assign the 
portion of the that by the
        portion of docs belonging to a tenant.

        But to back up one step, what are you doing with that information? Disk 
space is not a useful
        or stable metric for indexes. It varies with the number of deleted 
documents, changes during 
        and after merges, and you need extra unused disk space for Solr to 
function. That unused space
        must be dedicated to Solr, so should be counted even though it doesn’t 
have index files on it
        right now. Solr Cloud needs transaction logs even though those aren’t 
officially part of the index.

        All of that means that there is no API for one tenant’s part of the 
disk space and there won’t be
        an API for it. The question doesn’t make sense for a Solr system.

        wunder
        Walter Underwood
        [email protected]
        http://observer.wunderwood.org/  (my blog)

        > On Apr 5, 2021, at 1:17 PM, Natarajan, Rajeswari 
<[email protected]> wrote:
        > 
        > I guess you mean number of documents ,not the size of index in disk. 
We are looking for size of index in disk.
        > 
        > Thanks,
        > Rajeswari
        > 
        > On 4/5/21, 10:32 AM, "Walter Underwood" <[email protected]> wrote:
        > 
        >    Assuming each tenant has an ID, you can get the size by searching 
for tenant_id:1234 and requesting zero rows. We do that for metrics for 
different document types in the same collection.
        > 
        >    wunder
        >    Walter Underwood
        >    [email protected]
        >    http://observer.wunderwood.org/  (my blog)
        > 
        >> On Apr 5, 2021, at 10:02 AM, Natarajan, Rajeswari 
<[email protected]> wrote:
        >> 
        >> Yes, that's correct .
        >> 
        >> Thanks,
        >> Rajeswari
        >> 
        >> On 4/5/21, 6:21 AM, "Jan Høydahl" <[email protected]> wrote:
        >> 
        >>   Why not the obious design choice of one collection per tenant? Are 
you afraid of Solr not handling a large number of collections?
        >> 
        >>   Jan
        >> 
        >>> 5. apr. 2021 kl. 06:59 skrev Natarajan, Rajeswari 
<[email protected]>:
        >>> 
        >>> Hi,
        >>> 
        >>> We plan to store multiple tenants in a single collection (multiple 
shards)  with a composite Id router with docId prefix as tenant id.
        >>> In this set up, how can a tenant’s index size be found. Solr 
metrics api gives the core’s index size .But in same core multiple tenants 
might be present.
        >>> Would like to know if there is any out of box solr api available 
for this case.
        >>> 
        >>> 
        >>> Thanks,
        >>> Rajeswari



Reply via email to