I want to show subdomain posts when visitor search something on main domain. How can i do that ?
You can use native WordPress feeds, or you can create your own feed, e.g. with only the title and link to each post.
Than you can access this feed from the other domain. You will also have to update your search results template accordingly.
It gets a bit more tricky if you use some advanced AJAX dynamic search solution - in that case you'd have to do a little more coding.