gsuite - file full path

Hi, I want to add full path to output of gsuite. I see that gsuite has parameters as IGNORE_FOLDER, INCLUDE_PATTERN, EXCLUDE_PATTERN, URL_FILTER. I wonder what they do and if I can use them somehow to help myself?

To edit an outputted path, you can modify url in Scripts:

url=file.url

Thanks @shinsuke.

I added this code to GoogleDriveDataStore.jave in gsuite repository:


            protected static final String FILE_HOST = "host";

.......


            String path;
            String parent_id = file.getParents().get(0);
            File parent_response =
                    client.getDrive().files().get(parent_id).setFields("name, parents").setSupportsTeamDrives(true).execute();
            String parent_name = parent_response.getName();
            path = parent_name;
            while (parent_response.getParents() != null) {
                parent_id = parent_response.getParents().get(0);
                parent_response = client.getDrive().files().get(parent_id).setFields("name, parents").setSupportsTeamDrives(true).execute();
                parent_name = parent_response.getName();
                path = parent_name + "\\" + path;
            }

            fileMap.put(FILE_HOST, path.toString());

I compiled it with maven, tested with shared drives and it works fine.
Is there any chance to add this to official fess-ds-gsuite release?

It seems to call GoogleDrive API several times in one crawling request. I want to avoid it.

1 Like