Advance search between two content types that are linked by entity reference fields I have "linked" 2 content types (Type A and Type B) by a field using the entity reference module.  They are "linked" by the other node's ID number.  For example, the entity reference field would have an input that says: "Select the node ID which is related to this content".  Now I would like to implement a smart search.  

For example, if someone searches for Type A, the search should also return the content of Type B that is "linked" to Type A based on that entity reference field.  Can this be done with search or Views?  In quasi-SQL, it would be something like:

"SELECT * FROM TypeA, TypeB WHERE TypeA.field_A=TypeB.nid"
In Views this called "Relationships".

Create view that show "Type A", then in filters add "Type B" to be also allowed.
Then add relation on field that you use for entity reference and made this relation required.

Now "Type B" content will be also displayed in view if related "Type A" is match search criteria.