mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-4794] ES query migration changes (#8773)
* [ACS-4794] ES query migration changes * [ACS-4974] Remove * from path as it causes exception * [ACS-4974] Apply PATH workarounds for PNAME and ANAME * [ACS-4974] Add custom query to autocomplete options filter * [ACS-4974] Correct username
This commit is contained in:
@@ -98,7 +98,7 @@ export class CustomResourcesService {
|
||||
getRecentFiles(personId: string, pagination: PaginationModel, filters?: string[]): Observable<ResultSetPaging> {
|
||||
const defaultFilter = [
|
||||
'TYPE:"content"',
|
||||
'-PNAME:"0/wiki"',
|
||||
'-PATH:"//cm:wiki/*"',
|
||||
'-TYPE:"app:filelink"',
|
||||
'-TYPE:"cm:thumbnail"',
|
||||
'-TYPE:"cm:failedThumbnail"',
|
||||
|
@@ -54,7 +54,7 @@ export class SearchPermissionConfigurationService implements SearchConfiguration
|
||||
if (this.queryProvider?.query) {
|
||||
query = this.queryProvider.query.replace(new RegExp(/\${([^}]+)}/g), searchTerm);
|
||||
} else {
|
||||
query = `(email:*${searchTerm}* OR firstName:*${searchTerm}* OR lastName:*${searchTerm}* OR displayName:*${searchTerm}* OR authorityName:*${searchTerm}* OR authorityDisplayName:*${searchTerm}*) AND ANAME:("0/APP.DEFAULT")`;
|
||||
query = `(userName:*${searchTerm}* OR email:*${searchTerm}* OR firstName:*${searchTerm}* OR lastName:*${searchTerm}* OR authorityName:*${searchTerm}* OR authorityDisplayName:*${searchTerm}*) AND PATH:"//cm:APP.DEFAULT/*"`;
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@ export class SearchFilterAutocompleteChipsComponent implements SearchWidget, OnI
|
||||
if (this.settings.field === AutocompleteField.CATEGORIES) {
|
||||
queryFragments = this.selectedOptions.map(val => `${this.settings.field}:"workspace://SpacesStore/${val.id}"`);
|
||||
} else {
|
||||
queryFragments = this.selectedOptions.map(val => `${this.settings.field}:"${val.value}"`);
|
||||
queryFragments = this.selectedOptions.map(val => val.query ?? `${this.settings.field}:"${val.value}"`);
|
||||
}
|
||||
this.context.queryFragments[this.id] = queryFragments.join(' OR ');
|
||||
this.context.update();
|
||||
|
@@ -19,6 +19,7 @@ export interface AutocompleteOption {
|
||||
value: string;
|
||||
id?: string;
|
||||
fullPath?: string;
|
||||
query?: string;
|
||||
}
|
||||
|
||||
export enum AutocompleteField {
|
||||
|
Reference in New Issue
Block a user