+ Start a Discussion
Gautam_KasukhelaGautam_Kasukhela 

SOSL on PickLists

Hello All,
     The SOSL query that I am using to search for a picklist value on a custom object does not return any results, although there are 25 records  in the custom object that contain the value that I am searching for. 

FIND {Airbus} IN ALL FIELDS RETURNING Aircraft__c(Date_of_purchase__c)

I am searching for the 'Airbus' value in all the fields. The Object's 'isSearchable' property is also true. Is there anything that I am missing here?

Regards,
Gautam.
Best Answer chosen by Gautam_Kasukhela
Lokesh KumarLokesh Kumar
I think it's been acknowledged by salesforce and idea has been posted for the same please have a look.

https://success.salesforce.com/ideaView?id=08730000000BrnQAAS

Thanks !

All Answers

Lokesh KumarLokesh Kumar
Hi Gautam,

The search() call searches most objects (including custom objects) and text fields to which you have access. It does not search the following objects and fields:
 
Any elements such as picklists that are defined as not searchable (searchable is false). To determine whether a given object is searchable, your application can invoke the describeSObjects() call on the object and inspect the searchableproperty in the DescribeSObjectResult.
Number, date, or checkbox fields. To search for such information, use the query() call instead.
Textarea fields, unless you use the ALL FIELDS search group.
Attachment records associated with certain objects, such as Account, Contact, or Opportunity.

Did this answer your question? if so, please mark it solved.
Gautam_KasukhelaGautam_Kasukhela
Hello Lokesh,
     With reference to your answer, I mentioned in my question that the 'isSearchable' property for my object is true and yet it does not return results. Why is that?

Regards,
Gautam.
Lokesh KumarLokesh Kumar
I think it's been acknowledged by salesforce and idea has been posted for the same please have a look.

https://success.salesforce.com/ideaView?id=08730000000BrnQAAS

Thanks !
This was selected as the best answer