Indexing shared folders: for each user individually?

I have 119 users, who all use one very large shared folder. Does elasticsearch have to index the same folder 119 times, for each of the users, or is there a shared index for shared folders? Asking because when running the initial index, it looked like the folder is indexed for each user individually.

Yes, all files of your users will be listed as indexeable, but if the current version of a file is already indexed in elasticsearch, it will not be indexed again.

I means that the first user that have access to a shared folder will be used to index the files from the folder, then when another user have access to the same shared folder, files will be detected but not indexed a second time.

Hi,
I’ve got the situation vasyugan described.
fulltextsearch+elasticsearch indexes group shared files (over 14Tb) for each user all over again.
OS: Ubuntu 18.04
Elasticsearch 6.8.15 (also tried 6.0.1, same result)
Mysql 8
Php 7.4
NC: 21.0.1
Full text search 21.0.1
Full text search - Elasticsearch Platform 21.0.0
Full text search - Files 21.0.1

When I run occ fulltextsearch:index it just indexes same files for each user. One fullscan for one user takes more that two days :frowning:

/var/www/nextcloud/occ fulltextsearch:test                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                  
.Testing your current setup:                                                                                                                                                                                                                                                      
Creating mocked content provider. ok                                                                                                                                                                                                                                              
Testing mocked provider: get indexable documents. (2 items) ok                                                                                                                                                                                                                    
Loading search platform. (Elasticsearch) ok                                                                                                                                                                                                                                       
Testing search platform. ok                                                                                                                                                                                                                                                       
Locking process ok                                                                                                                                                                                                                                                                
Removing test. ok                                                                                                                                                                                                                                                                 
Pausing 3 seconds 1 2 3 ok                                                                                                                                                                                                                                                        
Initializing index mapping. ok                                                                                                                                                                                                                                                    
Indexing generated documents. ok                                                                                                                                                                                                                                                  
Pausing 3 seconds 1 2 3 ok                                                                                                                                                                                                                                                        
Retreiving content from a big index (license). (size: 32386) ok
Comparing document with source. ok
Searching basic keywords:
 - 'test' (result: 1, expected: ["simple"]) ok
 - 'document is a simple test' (result: 2, expected: ["simple","license"]) ok
 - '"document is a test"' (result: 0, expected: []) ok
 - '"document is a simple test"' (result: 1, expected: ["simple"]) ok
 - 'document is a simple -test' (result: 1, expected: ["license"]) ok
 - 'document is a simple +test' (result: 1, expected: ["simple"]) ok
 - '-document is a simple test' (result: 0, expected: []) ok
 - 'document is a simple +test +testing' (result: 1, expected: ["simple"]) ok
 - 'document is a simple +test -testing' (result: 0, expected: []) ok
 - 'document is a +simple -test -testing' (result: 0, expected: []) ok
 - '+document is a simple -test -testing' (result: 1, expected: ["license"]) ok
 - 'document is a +simple -license +testing' (result: 1, expected: ["simple"]) ok
Updating documents access. ok
Pausing 3 seconds ^[[A1 2 3 ok
Searching with group access rights:
 - 'license' - [] -  (result: 0, expected: []) ok
 - 'license' - ["group_1"] -  (result: 1, expected: ["license"]) ok
 - 'license' - ["group_1","group_2"] -  (result: 1, expected: ["license"]) ok
 - 'license' - ["group_3","group_2"] -  (result: 1, expected: ["license"]) ok
 - 'license' - ["group_3"] -  (result: 0, expected: []) ok
Searching with share rights:
 - 'license' - notuser -  (result: 0, expected: []) ok
 - 'license' - user2 -  (result: 1, expected: ["license"]) ok
 - 'license' - user3 -  (result: 1, expected: ["license"]) ok
Removing test. ok
Unlocking process ok
php7.4 /var/www/nextcloud/occ fulltextsearch:check
Full text search 21.0.1

- Search Platform:
Elasticsearch 21.0.0 (Selected)
{
    "elastic_host": [
        "http://elastic:********@127.0.0.1:9200"
    ],
    "elastic_index": "nextcloud",
    "fields_limit": "10000",
    "es_ver_below66": "0",
    "analyzer_tokenizer": "standard"
}

- Content Providers:
Files 21.0.1
{
    "files_local": "1",
    "files_external": "0",
    "files_group_folders": "1",
    "files_encrypted": "0",
    "files_federated": "0",
    "files_size": "1024",
    "files_pdf": "1",
    "files_office": "1",
    "files_image": "0",
    "files_audio": "0"
}

Any piece of advice?
Thanks!