Answers.Body: <p>The <code>resave/entries</code> command has an optional parameter to rebuild the search indices - may be worth a shot:</p>
  <p><code>./craft resave/entries --update-search-index</code></p>
  <p><a href="https://craftcms.com/docs/3.x/searching.html#rebuilding-your-search-indexes" rel="nofollow noreferrer">https://craftcms.com/docs/3.x/searching.html#rebuilding-your-search-indexes</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-28T05:15:58.977Z
Answers.Text: Thank you, that did the trick!
Answers.UserDisplayName: Crafty Cat
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-26T15:20:32.877Z
Answers.LastActivityDate: 2020-08-26T15:20:32.877Z
Answers.UserDisplayName: James Smith
Body: <p>I have set up a staging site alongside production just <a href="https://craftcms.com/docs/3.x/sites.html#setting-up-a-new-site" rel="nofollow noreferrer">like the docs describe</a> (Craft Solo 3.4.24). I have copied the &quot;Site Settings&quot; for all sections and set the &quot;Propagation Method&quot; to &quot;Save entries to all sites enabled for this section&quot;.</p>
  <p>Because Craft had trouble replicating all entries in one queue job I did this manually via CLI using <code>./craft resave/entries --type=&lt;type&gt;</code> and <code>./craft resave/entries --section=&lt;section&gt;</code>. This worked beautifully.</p>
  <p>But I have an issue with the site search. Locally, when I search e.g. for 'citizen', I get the expected results (count is 60). Same on production. But on stage I get only 2 results back.</p>
  <p>When I add <code>.site('*')</code> to the query in Twig I get 120 results back, so the staging site does have all entries.</p>
  <p>It appears as if the search index on stage is not complete? Is there anything I can do to refresh it?</p>
  <p>Thank you!</p>
  
Tags: <craft3><search><multi-site>
Title: Inconsistent search results in multi-site setup (prod/stage)
ThreadText: # Inconsistent search results in multi-site setup (prod/stage)
  
  (Asked by: username_0 on 2020-08-23)
  
  I have set up a staging site alongside production just [like the docs describe](https://craftcms.com/docs/3.x/sites.html#setting-up-a-new-site) (Craft Solo 3.4.24). I have copied the "Site Settings" for all sections and set the "Propagation Method" to "Save entries to all sites enabled for this section".
  
  Because Craft had trouble replicating all entries in one queue job I did this manually via CLI using `./craft resave/entries --type=<type>` and `./craft resave/entries --section=<section>`. This worked beautifully.
  
  But I have an issue with the site search. Locally, when I search e.g. for 'citizen', I get the expected results (count is 60). Same on production. But on stage I get only 2 results back.
  
  When I add `.site('*')` to the query in Twig I get 120 results back, so the staging site does have all entries.
  
  It appears as if the search index on stage is not complete? Is there anything I can do to refresh it?
  
  Thank you!
  
  **Tags:** craft3, search, multi-site
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-26. Score: 0 | Accepted answer
  
  The `resave/entries` command has an optional parameter to rebuild the search indices - may be worth a shot:
  
  `./craft resave/entries --update-search-index`
  
  <https://craftcms.com/docs/3.x/searching.html#rebuilding-your-search-indexes>
  
  > **Comments:**
  > **username_0**: Thank you, that did the trick!  
  
  ---
  
  