title: How to sort the posts using their post_type
body: <p>I am using two custom post_types where i display both of them in the search page.
  There i need to sort the posts according to their posttype.</p>
  
  <pre><code>like if(custom_post_type1)
  {
     print all posts under custom_post_type1;
  }elseif(custom_post_type2)
  {
     print all posts under custom_post_type2;
  }
  </code></pre>
  
  <p>I can see that there is query_post , i am not sure about the arguments, specifically i need the post types 1 to be at the first and the other after these posts.
  I need to sort in the search result page.</p>