+ Start a Discussion
Dogen ZenjiDogen Zenji 

Searching Text in Files Uploaded to CRM Content

I was hoping one of you bright people could answer a question regarding SOSL and Content.  In the standard Document object, there is a field called IsBodySearchable that allows SOSL to search within the file contents of an uploaded file.  I also know that in the latest release, the ContentVersion object is now searchable with SOSL, and I know that feature was implemented due to this idea in the IdeaExchange which specifically asks for searching file content.  However, I don't see that same field on the ContentVersion object and cannot find any documentation that specifically states that Content file contents can be searched.  I don't want to promise to a client that we can do this programmatically without seeing it in documentation or getting an "official" verification from someone internal to SFDC. Thanks community!

Best Answer chosen by Admin (Salesforce Developers) 
mtbclimbermtbclimber

I looked at the release notes from Spring '11 (February this year)  and find the doc ambiguous on this point. Also I don't see clear messaging to this effect in the API documentation on ContentVersion.  I did however speak with the search product manager and it is confirmed that attached file content is indexed (and included in scope for SOSL) for *some* ContentVersion records.  It's not clear why there isn't an IsBodySearchable field on ContentVersion as it seems to follow a similar pattern to documents, i.e. not *all* records have their attached files searchable therefore a row level flag still seems valid.

 

One difference between docs and content is that there is no "enabling" of body search. For documents there is a search admin preference that must be enabled whereas in content the files are always indexed if they qualify.  

 

Either myself or the search pm will chime back in on this.  If nothing else we'll get the documentation cleared up. 

 

Thanks,

 

 

All Answers

mtbclimbermtbclimber

I looked at the release notes from Spring '11 (February this year)  and find the doc ambiguous on this point. Also I don't see clear messaging to this effect in the API documentation on ContentVersion.  I did however speak with the search product manager and it is confirmed that attached file content is indexed (and included in scope for SOSL) for *some* ContentVersion records.  It's not clear why there isn't an IsBodySearchable field on ContentVersion as it seems to follow a similar pattern to documents, i.e. not *all* records have their attached files searchable therefore a row level flag still seems valid.

 

One difference between docs and content is that there is no "enabling" of body search. For documents there is a search admin preference that must be enabled whereas in content the files are always indexed if they qualify.  

 

Either myself or the search pm will chime back in on this.  If nothing else we'll get the documentation cleared up. 

 

Thanks,

 

 

This was selected as the best answer
Dogen ZenjiDogen Zenji

Thanks!  I would appreciate the additional clarity but it does sound like SOSL searches Content file contents which is what I was looking for.

SFDCMattSFDCMatt

Hi Andrew,

 

Can you give us the current state on this? Are all or just some file contents indexed for SOSL (if just some, which ones / what criteria)? Is there any documentation that speaks to this? I've spent the last hour looking and can't find anything definitive.


Thanks!
Matt