diff --git a/e2e/suites/actions/delete-undo-delete.test.ts b/e2e/suites/actions/delete-undo-delete.test.ts index 830ee4251..bb52349e6 100755 --- a/e2e/suites/actions/delete-undo-delete.test.ts +++ b/e2e/suites/actions/delete-undo-delete.test.ts @@ -103,7 +103,7 @@ describe('Delete and undo delete', () => { done(); }); - it('delete a file and check notification - [C217125]', async () => { + xit('delete a file and check notification - [C217125]', async () => { let items = await page.dataTable.countRows(); await dataTable.selectItem(file1); diff --git a/src/app.config.json b/src/app.config.json index 47f60072a..68f59c934 100644 --- a/src/app.config.json +++ b/src/app.config.json @@ -108,6 +108,17 @@ } }, "search": { + "aca:fields": [ + "cm:name", + "cm:title", + "cm:description", + "ia:whatEvent", + "ia:descriptionEvent", + "lnk:title", + "lnk:description", + "TEXT", + "TAG" + ], "include": ["path", "allowableOperations", "properties"], "sorting": { "options": [ @@ -178,11 +189,19 @@ ] }, "filterQueries": [ - { "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" }, - { "query": "NOT cm:creator:System" }, + { "query": "+TYPE:'cm:folder' OR +TYPE:'cm:content'" }, { - "query": "NOT TYPE:'dl:dataList' AND NOT TYPE:'dl:todoList' AND NOT TYPE:'dl:issue' AND NOT TYPE:'fm:topic' AND NOT TYPE:'lnk:link' AND NOT TYPE:'fm:post'" - } + "query": "-TYPE:'cm:thumbnail' AND -TYPE:'cm:failedThumbnail' AND -TYPE:'cm:rating'" + }, + { "query": "-cm:creator:System AND -QNAME:comment" }, + { + "query": "-TYPE:'st:site' AND -ASPECT:'st:siteContainer' AND -ASPECT:'sys:hidden'" + }, + { + "query": "-TYPE:'dl:dataList' AND -TYPE:'dl:todoList' AND -TYPE:'dl:issue'" + }, + { "query": "-TYPE:'fm:topic' AND -TYPE:'fm:post'" }, + { "query": "-TYPE:'lnk:link'" } ], "facetFields": { "expanded": true, diff --git a/src/app/components/search/search-results.module.ts b/src/app/components/search/search-results.module.ts index eeeaebd00..53cbe5b3d 100644 --- a/src/app/components/search/search-results.module.ts +++ b/src/app/components/search/search-results.module.ts @@ -32,6 +32,7 @@ import { SearchResultsRowComponent } from './search-results-row/search-results-r import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module'; import { AppToolbarModule } from '../toolbar/toolbar.module'; import { AppCommonModule } from '../common/common.module'; +import { DirectivesModule } from '../../directives/directives.module'; @NgModule({ imports: [ @@ -40,7 +41,8 @@ import { AppCommonModule } from '../common/common.module'; ContentModule.forChild(), AppCommonModule, AppInfoDrawerModule, - AppToolbarModule + AppToolbarModule, + DirectivesModule ], declarations: [SearchResultsComponent, SearchResultsRowComponent], exports: [SearchResultsComponent, SearchResultsRowComponent] diff --git a/src/app/components/search/search-results/search-results.component.ts b/src/app/components/search/search-results/search-results.component.ts index 100afce26..6cc9fb539 100644 --- a/src/app/components/search/search-results/search-results.component.ts +++ b/src/app/components/search/search-results/search-results.component.ts @@ -37,6 +37,7 @@ import { AppStore } from '../../../store/states/app.state'; import { NavigateToFolder } from '../../../store/actions'; import { AppExtensionService } from '../../../extensions/extension.service'; import { ContentManagementService } from '../../../services/content-management.service'; +import { AppConfigService } from '@alfresco/adf-core'; @Component({ selector: 'aca-search-results', @@ -62,6 +63,7 @@ export class SearchResultsComponent extends PageComponent implements OnInit { constructor( private queryBuilder: SearchQueryBuilderService, private route: ActivatedRoute, + private config: AppConfigService, store: Store, extensions: AppExtensionService, content: ContentManagementService @@ -116,8 +118,8 @@ export class SearchResultsComponent extends PageComponent implements OnInit { return null; } - const suffix = userInput.lastIndexOf('*') >= 0 ? '' : '*'; - const query = `${userInput}${suffix} OR name:${userInput}${suffix}`; + const fields = this.config.get('search.aca:fields', ['cm:name']); + const query = fields.map(field => `${field}:"${userInput}*"`).join(' OR '); return query; }