[SalesForce] Salesforce gobal search results from api

We've created a simple page that inserts in Salesforce a contact through API.
This page will create a new Contact. Let's suppose we have created a dummy contact named 'Donald Duck' with our page.
When we use the global search with 'Donald Duck' Salesforce doesn't find out our new contact. We must wait about 5 or 10 minutes before the result come out in the global search.

Notice: if we use the Id of the record returned by the create API, we can enter immediately in the record detail page. So our page works and the record is saved correctly in Salesforce, but the global search doesn't show it immediately.

Does anybody know if there are some tedious limits about global search? … I didn't find anyone about API created records.

Best Answer

Yes it can take up to several minutes in a Large Data Volume Org for Salesforce.com to do the Search indexing. Search (At the API Layer SOSL) is different than SObject Querying (SOQL).

http://www.salesforce.com/docs/en/cce/ldv_deployments/salesforce_large_data_volumes_bp.pdf

Search Architecture

Search is the capability to query records based on free-form text. The Salesforce search architecture is based on its own data store, whichis optimized for searching for that text.

Salesforce provides search capabilities in many areas of the application, including: • The sidebar • Advanced and global searches • Find boxes and lookup fields • Suggested Solutions and Knowledge Base • Web-to-Lead and Web-to-Case • Duplicate lead processing • Salesforce Object Search Language (SOSL) for Apex and the API

For data to be searched, it must first be indexed. The indexes are created using the search indexing servers, which also generate and asynchronously process queue entries of newly created or modified data.

These servers generally process queues of fewer than 9,000 records in 1 to 3 minutes.

If more than 9,000 records are waiting to be indexed, the servers perform bulk indexing at a lower priority, so processing might take longer.

Until the records are indexed, they do not show up in searches; this delay might be long for large numbers of new or modified records.

Salesforce performs indexed searches by first searching the indexes for appropriate records, then narrowing down the results based on access permissions, search limits, and other filters. This process creates a result set, which typically contains the most relevant results.

After the result set reaches a predetermined size, the remaining records are discarded. The result set is then used to query the records from the database to retrieve the fields that a user sees.

Tip: Search can also be accessed with SOSL, which in turn can be invoked using the API or Apex.

Related Topic