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
Robert Baillie 10Robert Baillie 10 

Searching ContentDocument with SOSL 'Name Fields' appears to return documents with the search string in the content

It looks like when I issue a SOSL statement against NAME FIELDS in ContentDocument, I get documents that have the search string *in the content* as well.

I really need it to just search the name fields, as requested.

Has anyone seen this behaviour / corrected it?

E.g. the following SOSL statements:

In developer console:
FIND {Bob} IN NAME FIELDS RETURNING ContentDocument(Id, Title ORDER BY Title) LIMIT 20

Or, in Apex
FIND :searchString IN NAME FIELDS RETURNING ContentDocument(Id, Title ORDER BY Title) LIMIT :MAX_SEARCH_RESULTS



 
Raj VakatiRaj Vakati
I am also seeing the same behavior.SOSL looks like searching event for the content in the files also