0

I'm using a Sharepoint Discussion Board, and trying to display search results on my page, displaying only the items, without the replies. I tried only getting results without a ParentItemID by adding a refinement filter like this:

&refinementfilters='ParentItemID:(null)'

...but I get an internal server error, likely because FQL doesn't accept null as a valid parameter. How can I use the Search API to check if an value is null, or if that is not possible, how do I get only items without replies?

I have thought of filtering out the replies after the API call returns them, but this prevents me from getting an even ten items per page (I'm using rows to only get a page of results at a time).

  • Have you tried <1? Just a guess since ID is numeric. – Matthew McDermott Sep 13 '17 at 22:24
0

I solved my issue by using a different refinement filter. Rather than using ParentItemID, I used SPContentType:

&refinementfilters='SPContentType:(\"Discussion\")'

This filters out replies, which have an SPContentType of "Message."

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.