<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 15/12/2019 17:13, John Gateley
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:0c1c670b-b967-48ac-a35f-5cea7fdd7312@jfoo.org">Hi,
      <br>
      <br>
      I have Solr FTR working with dovecot, and need to do the commit
      and optimize recommended here:
      <br>
      <a class="moz-txt-link-freetext" href="https://wiki.dovecot.org/Plugins/FTS/Solr">https://wiki.dovecot.org/Plugins/FTS/Solr</a>
      <br>
      <br>
      Should this run as root, or as each mail user. The documentation
      above implies, but doesn't state,
      <br>
      that it is root. The docs here are similar:
      <br>
      <a class="moz-txt-link-freetext" href="http://grimore.org/networking/dovecot/full_text_search">http://grimore.org/networking/dovecot/full_text_search</a>
      <br>
      <br>
      But the docs here say it has to be done for each user:
      <br>
      <a class="moz-txt-link-freetext" href="http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/">http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/</a>
      <br>
      <br>
      I don't know Solr well enough to answer. Which is correct?
      <br>
      <br>
      Thanks
      <br>
      <br>
      John
      <br>
      <br>
    </blockquote>
    <p>John</p>
    <p>the optimize and commit commands don't specify any mail user in
      them:</p>
    <pre># Optimize should be run somewhat rarely, e.g. once a day
<span class="anchor" id="line-2-4"></span>curl https://<hostname/ip>:<port|default 8983>/solr/dovecot/update?optimize=true
<span class="anchor" id="line-3-4"></span># Commit should be run pretty often, e.g. every minute
<span class="anchor" id="line-4-1"></span>curl https://<hostname/ip>:<port|default 8983>/solr/dovecot/update?commit=true

It doesn't actually matter which cron user you run them under so long as that user can execute the commands successfully. The idea (if you need them) is to run them globally under a single user. 
If you schedule them under more than one cron user it is just running the same commands more times, not doing anything specific per user.

John

</pre>
    <div style="position: absolute; left: -99999px;">0 1 * * * curl
      <a class="moz-txt-link-freetext" href="http://127.0.0.1:8080/solr/update?optimize=true">http://127.0.0.1:8080/solr/update?optimize=true</a>
      2 * * * * curl <a class="moz-txt-link-freetext" href="http://127.0.0.1:8080/solr/update?commit=true">http://127.0.0.1:8080/solr/update?commit=true</a><br>
      <br>
      Copyright © UnixSamurai.com Read more at: <a
        href="http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/">http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/</a></div>
    <div style="position: absolute; left: -99999px;">curl
      <a class="moz-txt-link-freetext" href="http://127.0.0.1:8080/solr/update?optimize=true">http://127.0.0.1:8080/solr/update?optimize=true</a>
      2 * * * * curl <a class="moz-txt-link-freetext" href="http://127.0.0.1:8080/solr/update?commit=true">http://127.0.0.1:8080/solr/update?commit=true</a><br>
      <br>
      Copyright © UnixSamurai.com Read more at: <a
        href="http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/">http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/</a></div>
    <div style="position: absolute; left: -99999px;">curl
      <a class="moz-txt-link-freetext" href="http://127.0.0.1:8080/solr/update?optimize=true">http://127.0.0.1:8080/solr/update?optimize=true</a>
      2 * * * * curl <a class="moz-txt-link-freetext" href="http://127.0.0.1:8080/solr/update?commit=true">http://127.0.0.1:8080/solr/update?commit=true</a><br>
      <br>
      Copyright © UnixSamurai.com Read more at: <a
        href="http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/">http://www.unixsamurai.com/dovecot-full-text-search-jetty-solr/</a></div>
  </body>
</html>