I am trying to filter results from a JSOM KeywordQuery people search to only include people who have a "Department" listed, but it's still returning everyone, with and without departments.

I think I understand how to filter out an actual string, but how do I search for and filter out "null" values?

    var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context);
    var searchExecutor = new Microsoft.SharePoint.Client.Search.Query.SearchExecutor(context);


    var properties = keywordQuery.get_selectProperties();

    var filters = keywordQuery.get_refinementFilters();

1 Answer 1


The proposed solution here uses query syntax to achieve that: Querytext: blank value for a property

This is the only way I am aware of accomplishing this. I don't think there is a way of doing that with refinement filters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.