I have a search VF page (it is just like google search with text box). In this i am searching all fields of a object then retrieving records by sosl search (upto this functionality it is working fine).
Now i want to search by parent name then i need to retrieve the child records based on parent name. The following is the query i am using:
String searchQuery = 'FIND \'' + searchStr + '\' IN ALL FIELDS RETURNING Account (Id,Name,type),Investor__c(id,name,Account__c,Account__r.name,LastModifiedById,lastmodifieddate,OwnerID,Residual__c);