Forum Discussion

Elsa Naumann's avatar
Elsa Naumann
Brass Contributor
Jan 03, 2017

Modern Pages - Highlighted content not filtering search results for pages in other site collections

Hi all, 

I want to show pages from a different site collection using the highlighted content with a filter on Content includes the words to only show articles with specific content. This works just fine if the pages are created in the same site, but when I use All sites as my source, it appears that the filters don't work (there are plenty of results, but no filtering)

 

Has anyone else experienced this? Is it a bug, or is there some kind of work-around?  

  • Clearly a bug in the code which generates the KQL filter. It's a logical error where the code is not adding () around the content type id filter, messing up interpretation of AND and OR in the final query. So a proper boolean error. Should be reported.

      • Mikael Svenson's avatar
        Mikael Svenson
        Steel Contributor

        Thanks to Elsa Naumann who noticed the issue with () and contenttypeid has been fixed. Guess stuff happens in the dark :-D

         

        The query is however not optimized adding unneeded OR's - but who cares right? :)

  • Hi Elsa Naumann,

     

    You can select 3 scopes. 

    * this site

    * This site collection 

    * All sites

     

    This site will indeed only select from the current site

    This site collecction picks data from the current site collection

    The All sites option however is giving you exactly what you want. Data from all sites

     

    I then set a filter 

     

     

    Now my documents with the word business in the title field are shown.

     

    Can you give some more detail on the kind of filters that you are using?

    • Elsa Naumann's avatar
      Elsa Naumann
      Brass Contributor

      Hi Pieter Veenstra and thank you for your quick reply. 

       

      This approach works really well when the scope is "This site" or rather, the pages are in the same site. But when I do the same as below, with the "All sites" scope (as I know the pages I want to highlight are in a different site collection) the filters don't refine the results as accurately, for example titles not including the defined word are not excluded. 

Resources