Configure search indexing (AEN 4.2.0)
=====================================

.. raw:: html

    <h1>Configure search indexing<a class="headerlink" href="#configure-search-indexing" title="Permalink to this headline">¶</a></h1>
    <p>For search indexing to work correctly, verify that the AEN Compute node can
    communicate with the AEN Server.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>curl -m 5 $AEN_SERVER &gt; /dev/null
    </pre></div>
    </div>
    <p>There must be at least one <code class="docutils literal"><span class="pre">inotify</span></code> watch available for the
    number of subdirectories within the project root filesystem. Some Linux
    distributions default to a low number of watches, which can prevent the
    search indexer from monitoring project directories for changes.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cat</span> <span class="o">/</span><span class="n">proc</span><span class="o">/</span><span class="n">sys</span><span class="o">/</span><span class="n">fs</span><span class="o">/</span><span class="n">inotify</span><span class="o">/</span><span class="n">max_user_watches</span>
    </pre></div>
    </div>
    <p>If necessary, increase the number of max user watches with the following command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">echo</span> <span class="n">fs</span><span class="o">.</span><span class="n">inotify</span><span class="o">.</span><span class="n">max_user_watches</span><span class="o">=</span><span class="mi">100000</span> <span class="o">|</span> <span class="n">sudo</span> <span class="n">tee</span> <span class="o">-</span><span class="n">a</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">sysctl</span><span class="o">.</span><span class="n">conf</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">sysctl</span> <span class="o">-</span><span class="n">p</span>
    </pre></div>
    </div>
    <p>There must be at least one <code class="docutils literal"><span class="pre">inotify</span></code> user instance available per project.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cat</span> <span class="o">/</span><span class="n">proc</span><span class="o">/</span><span class="n">sys</span><span class="o">/</span><span class="n">fs</span><span class="o">/</span><span class="n">inotify</span><span class="o">/</span><span class="n">max_user_instances</span>
    </pre></div>
    </div>
    <p>If necessary, this can be increased with the following command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">echo</span> <span class="n">fs</span><span class="o">.</span><span class="n">inotify</span><span class="o">.</span><span class="n">max_user_instances</span><span class="o">=</span><span class="mi">1000</span> <span class="o">|</span> <span class="n">sudo</span> <span class="n">tee</span> <span class="o">-</span><span class="n">a</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">sysctl</span><span class="o">.</span><span class="n">conf</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">sysctl</span> <span class="o">-</span><span class="n">p</span>
    </pre></div>
    </div>
