Вопрос

What is the difference between spSiteDataQuery and KeywordQuery?

My goal is to search only a number of specific lists by their list GUID. The specific lists I need are both Generic List and Libraries.

Thanks.

Это было полезно?

Решение

The difference in the two is how they retrieve the desired data.

SPSiteDataQuery executes a CAML Query towards the SharePoint Site Collection.
Think of how you would use CAML Query to gather SPListItems from an SPList and scale it to a SPSite / SPWeb level.

KeywordQuery utilizes the SharePoint Search Service engine to retrieve data from the Indexed results.
Using the KeywordQuery is often recommended in most cases because it is faster to retrieve already indexed items.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top