So adding on to following issue,
i found out when i put a post only under sub category it will appear on search result after i filter it out from front end.
but if i include the post on both parent category and sub category that post does not show up on search results when i select sub category filter.
p.s – i just want to get the post appear when user select sub category and filter it out or user click parent category and filter it out. either way post should appear.
thanks