How to use the @alfresco/js-api.SearchRequest function in @alfresco/js-api

To help you get started, we’ve selected a few @alfresco/js-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Alfresco / alfresco-ng2-components / lib / content-services / src / lib / document-list / services / custom-resources.service.ts View on Github external
.then((person: PersonEntry) => {
                        const username = person.entry.id;
                        const filterQueries = [
                            { query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
                            { query: `cm:modifier:${username} OR cm:creator:${username}` },
                            { query: defaultFilter.join(' AND ') }
                        ];

                        if (filters && filters.length > 0) {
                            filterQueries.push({
                                query: filters.join()
                            });
                        }

                        const query: SearchRequest = new SearchRequest({
                            query: {
                                query: '*',
                                language: 'afts'
                            },
                            filterQueries,
                            include: ['path', 'properties', 'allowableOperations'],
                            sort: [{
                                type: 'FIELD',
                                field: 'cm:modified',
                                ascending: false
                            }],
                            paging: {
                                maxItems: pagination.maxItems,
                                skipCount: pagination.skipCount
                            }
                        });