What Is Return Type Of SOSL Query?
SOSL query returns list of list records as in a SOSL query, records can be of more than one sObject.
How To Access Record In Apex Returned By SOSL
Here is the below example for accessing the record returned by SOSL in Apex:
// Create a variable to store the results of the query.
List<sObject> records = [FIND {searchTerm} RETURNING FROM Account(Name) IN ALL FIELDS];
// Loop through the records and access the fields that you need.
for (SObject record : records) {
System.debug(record.get('Name'));
}