+ 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