Sharepoint search rest api get all results from 2 sites and filtered results from one site

matt howell 331 Reputation points

My api gets all news posts from 3 sites when the managed property refinablestring05 is true:

/_api/search/query?querytext='(Path: OR Path: OR Path: ) AND SPContentType:"Site Page" AND RefinableString05:true AND PromotedState:2 AND IsDocument:True AND FileExtension:aspx'&sortlist='FirstPublishedDate:descending'&startRow=0&rowlimit=15&selectproperties='Title,Description,RefinableString05,FirstPublishedDate,PictureThumbnailURL,WebId,Path'

I need to apply an additional filter (refinablestring01) to only one of the sites, something like:

((Path: OR Path: OR Path: AND RefinableString01:"Field value") AND RefinableString05:true'&sortlistetc

Is there a way to do this?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,273 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,767 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 32,726 Reputation points Microsoft Vendor

    Hi @matt howell ,
    Glad that you found the solution to this problem. Thanks for your sharing.

    You could accept your answer via the "Accept Answer" button, it would be helpful to others who have similar issue in the future.