Sharepoint sites search endpoint not finding certain sites

Vlad Vantaroo 20 Reputation points
2024-07-09T01:54:52.25+00:00

Originally, we were using the /sites endpoint to fetch all sites. However due to performance reasons, we have been trying to use the Sharepoint site search endpoint documented here to look up sites with a specified display name. However, after testing it a bit, we've seen that the /sites?search={query} endpoint sometimes doesn't even include some sites that were returned by the original /sites endpoint despite having the exact same display name as the search string we provided. None of the sites we are looking up are new and we have Sites.Read.All permission. It isn't well documented on how the search criteria is being met, so is there supposed to be a difference in how these two endpoints work?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,791 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ling Zhou_MSFT 18,020 Reputation points Microsoft Vendor
    2024-07-10T06:13:01.8966667+00:00

    Hi @Vlad Vantaroo,

    Thank you for your reply.According to your problem description, I conducted a test and found that our search = Kevin will only return results for sites starting with Kevin string.

    For example, if one of our sites is xxxKevin or xxxKevinxxx, they will not be in the search=K query results.

    Therefore, I suggest you use fuzzy search, such as search=Kevin* or search=*Kevin* . Then check whether the returned results are correct. Hope this helps you.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Ling Zhou_MSFT 18,020 Reputation points Microsoft Vendor
    2024-07-16T08:31:56.89+00:00

    Hi @Vlad Vantaroo,

    Apologies for the late reply!

    I did a lot of testing and tried to find out why the site wasn't searched, but I'm sorry that the search results here are all working fine.

    User's image

    We apologize that we can't provide further information on how to solve your problem, therefore we recommend you to open a ticket and ask for it.

    Please accept my sincerely apologize for any in convenience this may cause. Thank you for your kind understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.