Hello I want to search in Sites folder and I have tried to make my custom Query, but it is not working. I am sure I am doing something wrong , but I do not know what
I attached the query builder, can anyone help me with that?
public generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): QueryBody {
const defaultQueryBody: QueryBody = {
query: {
query: searchTerm ? `${searchTerm}* OR name:${searchTerm}*` : searchTerm
},
include: ['path', 'allowableOperations'],
paging: {
maxItems: maxResults,
skipCount: skipCount
},
filterQueries: [
// tslint:disable-next-line:quotemark
{ query: "TYPE:'cm:folder' OR TYPE:'cm:content'" },
{ query: 'NOT cm:creatorystem' }, { query: ' PARENT:\'workspace://SpacesStore/Company Home/Sites\'' }
]
};
return defaultQueryBody;
}
Thank you.