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
Suzan2009Suzan2009 

TextArea field search in Apex

hi guys,

 

I got a problem with textarea field query in Apex.

Becaus textarea field is not filterable, I try to use SOSL. According to this page I have to use IN ALL FIELDS so as to search on textarea fields.  http://www.salesforce.com//us/developer/docs/api/Content/sforce_api_calls_sosl_about.htm 

 

in my instance I got over 100000 contacts. There may be more than 1000 records returned if searching on IN ALL FIELDS. However just in few of them the specific textarea field contains the search string "%xxxx%". So finally in fact, there is no more than 1000(can be stored in to a list) meeting the criteria.

 

Is there any better way to solve this problem. Thanks in advance