You need to sign in to do that
Don't have an account?

SOSL
Hi,
Is it possible to use SOSL in public sites. I have a search query that always returns 0. I know there are objects of the type I'm returning that match the query I'm passing in, and the public user has read access to the object. Do I need to enable search for the user some how?
Thanks!
Scott
Of course...
If your using a managed package you have to include the prefix on the object names in the SOSL query.
Thanks for the help,
Scott
All Answers
Sure,
I'm trying to implement a simple search for our site. Just as a test I created the following controller:
public class SearchController extends ContentCore { public List<CustomObject__c> CustomObjects{get; set;} public List<List<SObject>> Results; public SearchController() { this.Results = [FIND 'A-*' IN ALL FIELDS RETURNING CustomObject__c(Id, Name)]; this.CustomObjects = (List<CustomObject__c>) this.Results[0]; } }
The name of the object is an auto generaged number A-{0000} and the search in the regular salesforce organization returns results. The public user has read all access
Of course...
If your using a managed package you have to include the prefix on the object names in the SOSL query.
Thanks for the help,
Scott