I would like to get all user created documents in the whole site collection using PnpJS Search.
const results = await sp.search({
Querytext: `
contentclass: "STS_ListItem_DocumentLibrary",
IsDocument:"true",
path: "http://mysp.net/sites/mysite/*
});
`
})
Unfortunately this still shows /Site Assets/ docs which are not user created. Obviously I can filter out these after the search - but wondering if it's possible to do an exclusion in the search? Is there a better way to do get all the user created docs or filter out the system generated ones - maybe using RefinementFilters
or some other contentclass
??
This is sp2013