Index an org
Build or rebuild an org's analysis index from its last sync so Code Intelligence, SOQL Risk, Query Amplification and other analysis pages show current results.
Overview
Syncing copies an org's metadata into MetaLens360. Indexing reads that copy and builds the analysis index: components, flows, triggers, dependencies and SOQL analysis. Pages such as Code Intelligence, SOQL Risk Intelligence, Query Amplification, Org Overview and Apex Flow Analyzer read from the index — so an org that hasn't been indexed since its last sync shows stale or empty results.
MetaLens360 indexes an org automatically when a sync completes. You index manually when the index is missing or behind, for example after an automatic index failed. Indexing does not contact Salesforce; it only re-reads the last sync.
Before you start
- The org must have been synced at least once. See Run your first sync.
- You need the Index / re-index orgs permission (
index.run). Every built-in role except Viewer has it.
Steps
Index one org
- Open Connections or Sync Center and find the org.
- Look at the badge next to Index: Never indexed, "Indexed 3h ago", or "Indexed 3h ago · stale". Hover over it for the component, flow and trigger counts.
- Click Index. A message confirms "Indexing started for <org> — this runs in the background."
- Wait for "Indexing complete for <org>." The badge updates.
Index several orgs
- Open Org Sync & Repo Fetch Status (
/sync-health) and stay on the Org Sync & Index Health tab. - Check the summary tiles: Orgs, Indexing now, Stale and Never indexed.
- Click one of:
- Index stale (n) — only orgs synced since their last index.
- Index selected (n) — tick orgs in the table first.
- Index all (n) — every org.
- A banner shows "Indexing N orgs — progress updates live below. You can leave this page; it keeps running."
- Click Refresh to reload the table. Each org's status reads Current, Stale or Never indexed.
Example
After a long weekend, Priya opens Org Sync & Index Health and sees Stale: 2 — acme-uat and acme-dev synced on schedule, but their automatic index failed. She clicks Index stale (2), moves on to other work, and checks back ten minutes later: both now read Current, and SOQL Risk shows the latest Apex.
FAQs
What does "stale" mean?
The org was synced after its last index, so the index is behind the stored metadata. Indexing again brings it up to date.
Does indexing re-sync the org?
No. It only rebuilds the index from what was last synced. If the metadata itself is old, run a sync instead — it indexes automatically when it completes.
How long does indexing take?
Usually a few minutes; large orgs take longer. It runs in the background, so you can leave the page.
Troubleshooting
Pages still say the org isn't indexed
Some pages name the button differently — for example "Index This Org Now" on Query Amplification or "Index Org" on Apex Flow Analyzer — but they all rebuild the same index. See Pages show no data.
"Could not start indexing."
You may lack the index.run permission, or the org is mid-sync. Wait for the sync to finish and try again.
Indexed, but 0 components
The Home page shows "Indexed but 0 components stored — re-run a full sync." The stored copy is empty or incomplete. Run Force Full Resync for that org.
Related articles
Was this article helpful?
Related articles
- Run your first syncPull an org's metadata into MetaLens360 from the Sync Center, follow its progress, and confirm it finished and was indexed so analysis pages have data.
- Check sync and fetch statusUse the Org Sync & Repo Fetch Status page to see how fresh each org index and repository is, and review a timeline of every sync, index and fetch run.
- Analysis pages show no dataIf Code Intelligence, SOQL Risk, Query Amplification or other analysis pages are empty, the org usually needs a sync, an index, or a full resync. Here's how to tell which.
- Selective sync and force full resyncChoose between an incremental Re-sync, a Selective sync of just the metadata types you need, and a Force Full Resync that re-retrieves everything.