function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
narendharnarendhar 

SOSL Query Bug

SOSL Query is not returning the updated results immidiately.

I am trying to implement the dedupe rules against multiple objects in my org, I am using the SOSL queries to find the matching records.
If i create two records with the same phone number with in 10 seconds of time difference , system is allowing the duplicates.
I debugged and found  that it is an issue with SOSL query. SOSL query is taking approximately 30 seconds to return the updated results.
If i create two records with more than 30 seconds interval  query is returning the results as expected .
you can replicate the behaviour by using below sample SOSL query, Create a lead with some phone number, immidiately update the below query with the phone number and execute in workbench or dev console.
FIND {Enter PhoneNumber here} IN PHONE FIELDS RETURNING Lead
Query will take up to 30 seconds to return the updated results.
Anyone else experienced similar kind of issues? Any workaround for this?