At times, it is necessary to reindex one or all orgs on a Chef Server.
A typical scenario is that the /analytics queue on the Chef Server has not been preemptively capped (older releases. Chef Server 12.3.x and up already do this automatically). This leads to a large backlog and inaccurate search indexes.
-- Multiple orgs
for org in $(chef-server-ctl org-list); do
chef-server-ctl reindex $org
-- Single org
chef-server-ctl reindex ORGNAME