Custom Search Box for Record type and its relationship recordtypes

Hi All

I want to create custom search box for my main record type,

whenever any user enter any value in the search box the data should be filter by the this value, this value should be compare with all the record types which have the relationship with my main record type

 

  Discussion posts and replies are publicly visible