+ Start a Discussion
niraj kumar 45niraj kumar 45 

SOSL Query not searching in 5 year older records

I have created a dynamic SOSL Query for existing SOQL query.But I am not getting all the records which I am getting 
form SOQL query.

When I compared the records which are missing from the SOSL then I found that those missing records where Created 5 Years ago from now.
So can this be the reason for not showing the records in SOSL?
I am new to SOSL.Please guide me.
Daniel MasonDaniel Mason
To Query Archived/Deleted records in SOQL, use ALL ROWS in statement .

If you add ALL ROWS at the end of a SOQL query, archived and deleted records will be included in the results.
Here's an example below of query returning ALL tasks:
As you can probably imagine, pulling all deleted and archived records into the results could a be hard to manage...so using the "IsDeleted" and "IsArchived" after the "WHERE" clause can help filter the results:
1SELECT Id FROM Task ALL ROWS WHERE IsDeleted = false AND IsArchived = fals
Is it possible to use ALL ROWS in SOSL?  I can't seem to get the syntax to work.