Forum Discussion

Mike Jansen's avatar
Mike Jansen
Iron Contributor
Apr 05, 2017
Solved

Call "standard" search result page (or webpart) from custom query

I have a document library with a lot of documents (+1000). The documents have a "Label" column. I created a script which reads all those different Labels and populates a dropdown:   When I s...
  • Mikael Svenson's avatar
    Mikael Svenson
    Apr 07, 2017
    You need to construct the KQL to pass to limit for what you need:

    /_layouts/15/osssearchresults.aspx?u=https://..path-to-document-library&k=myterm prop1:propvalue

    If you column with a property is a site column it will have generated an automatic managed property for you which you can query for. Say you have a text site column named "Foo", then the managed property would be named FooOWSTEXT, and you query would be:

    /_layouts/15/osssearchresults.aspx?u=https://..path-to-document-library&k=myterm FooOWSTEXT:label

Resources