Forum Discussion

Sigi7's avatar
Sigi7
Brass Contributor
Aug 26, 2022
Solved

Pnp Search V4 - Refinment filter for Boolean

Hi,

 

I'm trying to filter search results by a boolean column.

Debugging view shows:

 

...
"RefinableYesNo00": "true",
...

 

 

Refinement filter 

 

FileType:equals("aspx")

 

works fine, but 

 

RefinableYesNo00:equals("true")

 

not.

Any hint what's wrong?

 

Thx,

Sigi

  • Sigi7's avatar
    Sigi7
    Sep 05, 2022

    Hi DaveMehr365 

     

    DSBolYesNoOWSBOOL doesn't exist here.

     

    But got the solution from git:

    RefinableYeNo00:true

     works. 🙂

     

    br,

    Sigi

3 Replies

  • Hello Sigi7 

     

    you need to use the default manage property from the site column, in my case it calls DSBolYesNoOWSBOOL

     

    Query snippet to filter true

    DSBolYesNoOWSBOOL:1

     

    Query snippet to filter false

    DSBolYesNoOWSBOOL<>1

     

    Background

    You can analyse the properties with the Search Query Tool: https://github.com/pnp/PnP-Tools/tree/master/Solutions/SharePoint.Search.QueryTool . With this tool you can see the value in the default managed property DSBolYesNoOWSBOOL is 1, in the RefinableYesNo00 it's true .

     

    In the testings i have no chance to filter the RefinableYesNo00, but the DSBolYesNoOWSBOOL works fine in results, but not in filters, web part.

     

    Best, Dave 

    • Sigi7's avatar
      Sigi7
      Brass Contributor

      Hi DaveMehr365 

       

      DSBolYesNoOWSBOOL doesn't exist here.

       

      But got the solution from git:

      RefinableYeNo00:true

       works. 🙂

       

      br,

      Sigi

      • Hello Sigi7 

         

        sure, DSBolYesNoOWSBOOL is a custom column in my environment.

         

        Nice to hear.

         

        Regards, Dave

Resources