Search the document using SharePoint search API not include content

Sachin Jindal 0 Reputation points
2023-07-13T19:46:49.2866667+00:00

I do not want my search API to search for the content.

_api/search/query?queryTemplate='"tax" '&selectproperties='RefinableString00'&refinementfilters='and (RefinableString107:("US%20Tax"),ListId:("-6e1f-42a9-ab38-f37912c8c303"),RefinableString104:("test"))'&trimduplicates=false&rowlimit=5000&sortlist='[docid]:ascending'

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,052 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,212 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChengFeng - MSFT 5,045 Reputation points Microsoft Vendor
    2023-07-14T05:30:56.67+00:00

    Hi @Sachin Jindal

    Could you please tell me what you don't want to display, can you be more specific?

    My thoughts on your scenario are:

    By removing the queryTemplate parameter, the search API will not perform a content search, it will only apply the specified refiner filters to retrieve results based on those filters.

    _api/search/query?selectproperties='RefinableString00'&refinementfilters='and (RefinableString107:("US%20Tax"),ListId:("-6e1f-42a9-ab38-f37912c8c303"),RefinableString104:("test"))'&trimduplicates=false&rowlimit=5000&sortlist='[docid]:ascending'
    

    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.

    Best Regards

    Cheng Feng


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.