Support for filter by parent document (#6850)
* Backend support for filter by parent document * parentDocumentId -> documentId
This commit is contained in:
@@ -40,6 +40,8 @@ type SearchOptions = {
|
||||
dateFilter?: DateFilter;
|
||||
/** Status of the documents to return */
|
||||
statusFilter?: StatusFilter[];
|
||||
/** Limit results to a list of documents. */
|
||||
documentIds?: string[];
|
||||
/** Limit results to a list of users that collaborated on the document. */
|
||||
collaboratorIds?: string[];
|
||||
/** The minimum number of words to be returned in the contextual snippet */
|
||||
@@ -367,6 +369,12 @@ export default class SearchHelper {
|
||||
});
|
||||
}
|
||||
|
||||
if (options.documentIds) {
|
||||
where[Op.and].push({
|
||||
id: options.documentIds,
|
||||
});
|
||||
}
|
||||
|
||||
const statusQuery = [];
|
||||
if (options.statusFilter?.includes(StatusFilter.Published)) {
|
||||
statusQuery.push({
|
||||
|
||||
Reference in New Issue
Block a user