I am working on use case, where i need to search a keyword on a custom Object containing three Rich Text Fields. I am using the string method containsIgnoreCase(). But even if the field contains the keyword, i get false in return when i do ( Rich_Text__c.containsIgnoreCase(keyword) ). Am i doing something wrong here, or is there a better way to do this ?
Note :
- The Rich_Text__c records currently contain only texts with some HTML markups.
- I have done a SOQL Query to search on the Custom Object
obj
with a rich text fieldRich__c
whose contents are<p><u>This is underlined.</u></p><p class="ql-indent-1">This is a keyword: <b>zebra</b>.</p>
thenobj.Rich__c.containsIgnoreCase('zebra')
returnsTRUE
. Can you post come sample code to illustrate your exact problem? It's also not clear how SOSL fits into your scenario/problem.