Please specify what version of the library you are using: [ v2 ]
Please specify what version(s) of SharePoint you are targeting: [ SPO ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
I'm using pnp search in a custom webpart to find items based on text/search query. Can you help with the below questions?
import { Search } from "@pnp/sp";
const search = new Search("Your URL");
const results = await search.execute({your query object or string})
Hi @Namrata99sah,
Path property in KQL:import { sp } from '@pnp/sp/presets/all';
(async () => {
const rootAbsPath = 'https://contoso.sharepoint.com/sites/site/Shared%20Documents';
const res = await sp.search(`* Path:"${rootAbsPath}"`);
console.log(res.PrimarySearchResults);
})().catch(console.log);
To add to what @koltyakov says here, there is no special pnp search. We call the REST search service in SharePoint, meaning all the features and security remain in effect.
Hi,
I'm getting below error when trying to map the results into Details List.
Uncaught TypeError: Cannot read property 'length' of undefined
at Selection.IDeG.Selection.setItems (Selection.js:70)
at DetailsListBase.DfTE.DetailsListBase.componentWillReceiveProps
Any ideas?
On Thu, Oct 29, 2020 at 6:16 PM Patrick Rodgers notifications@github.com
wrote:
To add to what @koltyakov https://github.com/koltyakov says here, there
is no special pnp search. We call the REST search service in SharePoint,
meaning all the features and security remain in effect.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pnp/pnpjs/issues/1423#issuecomment-718729207, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AO5XI2PG2SOOMBAA5J7ZW7TSNFPZVANCNFSM4TDT2LIQ
.
You're evoking length property for the object which is undefined, in a custom JS file with name Selection.js (oh, it looks like Office UI Fabric) on a line number 70. =) Anyways, this is not connected with PnPjs.
Going to close this.