SOSL the Salesforce Object Search Language syntax. Use this tag for questions related to SOSL and handling query ouput.

learn more… | top users | synonyms

6
votes
1answer
64 views

How long does it take for Salesforce to build the SOSL index?

After adding new data to Salesforce, the records do not show up immediately in SOSL queries or the Salesforce search interface. How long does it take for new information to be indexed? I'm looking ...
6
votes
1answer
108 views

SOSL : FIND '“com”' returning more records than FIND '“com” or “net”'

When trying to search a string using SOSL, it behaves differently for one search parameter vs two search parameters with logical operator. Search String 1 : FIND '"com"' => No of Records Returned : ...
10
votes
1answer
552 views

SOQL vs SOSL - Which one to use and when?

What arguments can be made to use SOQL or SOSL? When would you use one over the other? What is the main difference?
6
votes
2answers
141 views

Is there any way to filter a SOQL or SOSL query on the Id field?

I've tried a number of ways including: SELECT Id, Name FROM Account WHERE Id LIKE '0013%' and FIND { 0013 } IN ALL FIELDS RETURNING Account (Id, Name) and all I receive is the same ...
1
vote
2answers
95 views

How to build a Stackexchange-like search while typing in Salesforce

We have an internal defect tracker in Salesforce which should have much more of the charming features of Stackexchange. One feature that I love the most is the live-search for duplicates while ...
5
votes
1answer
99 views

Why does SOSL return a List of a List of sObjects in Apex?

When I use SOSL in Apex (search.query();) the return type is List<List<sObject>>, but I've never run across a case in which there is more than one list returned. For example, this: ...
4
votes
1answer
79 views

Implementing a Keyword Search

A more detailed explanation follows, but the core of my question is: what are best practices for implementing a general keyword search in SOQL/Apex? In an app that I'm building, we're using a data ...
3
votes
1answer
79 views

Relationships in SOSL

Can I use relationships in SOSL? Example: Find all first names that start with 'Roc' within Position__c FIND \'Roc*\' IN ALL FIELDS RETURNING Position__c(Id, Contact__r.FirstName WHERE Title__c = ...
4
votes
2answers
275 views

Apex SOSL Paging Implementations

How might one implement SOSL paging, i.e. get the next 200 results, in Apex?