<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>EPrints makes some decisions on what to index. Those can be
      overridden, if I recall the old magics from the dawn of time.</p>
    <p><a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Flib%2Fdefaultcfg%2Fcfg.d%2Findexing.pl&amp;data=01%7C01%7C%7C2869087cc1a6427a613c08d7ece0a485%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=hFiR5RBcISoUoOQrBDXCFvHvZnk1RztxJq1nJD%2BbJP4%3D&amp;reserved=0" originalSrc="https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/cfg.d/indexing.pl" shash="JMB48g7NpNmEBNVuP881j1CAK5U+lODflG1z2GMSivwHEV9cm3YWxnlRefgh641ZdleOwar+jFs/Fd5n/Hak9ZRlHXBy2BVrkcyIk5k9sRtQPX/eagPggD4zI7UwVCJ+1n3ws7gfDDUJ8wl7iVNsfNZfWaECRLRz2HhN/Hc9zDg=">https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/cfg.d/indexing.pl</a></p>
    <p>That, by default, uses EPrints word split function
<a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fperl_lib%2FEPrints%2FIndex%2FTokenizer.pm%23L39&amp;data=01%7C01%7C%7C2869087cc1a6427a613c08d7ece0a485%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=ZP1jFbLkYqS2NlyxJYYCBkZV%2FW7QvZ2s0WpWlW3NimA%3D&amp;reserved=0" originalSrc="https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Index/Tokenizer.pm#L39" shash="iX4Zfb01QXW+9CSmaXibzdI2nNNvU/VtXZZG5y56gBOiXjZmySPV/9ZPC5ICZ2sJodDGgCf2lHuTMidIXcjI6pN1MKC/3E1dVC++WYcYtzuRL0Yd4s2CeZE1G+xv5ksQcBH20XzKMzG9TYYE+yV7mReZf1jnUHhR19J5LNBGLhE=">https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Index/Tokenizer.pm#L39</a>
      which apparently uses the perl regexp library to decide word
      breaks, but you can write one that does what you want. <span class="pl-c1"><span class="text-bold bg-yellow-light rounded-1
          d-inline-block">freetext_seperator_chars seems utterly ignored
          now. <br>
        </span></span></p>
    <p><span class="pl-c1"><span class="text-bold bg-yellow-light
          rounded-1 d-inline-block">This is still obeyed </span></span><br>
      <span class="pl-c1"><span class="text-bold bg-yellow-light
          rounded-1 d-inline-block"><span class="pl-smi">$c</span><span class="pl-k">-&gt;</span>{<span class="pl-c1">indexing</span>}<span class="pl-k">-&gt;</span>{<span class="pl-c1">freetext_min_word_size</span>}
          = 3;</span></span></p>
    <p><span class="pl-c1"><span class="text-bold bg-yellow-light
          rounded-1 d-inline-block">Which caused some issues for people
          with Chinese name &quot;Wu&quot;.</span></span></p>
    <p><span class="pl-c1"><span class="text-bold bg-yellow-light
          rounded-1 d-inline-block">I would suggest considering keeping
          it by altering indexing.pl to always index numbers even if
          they are one or two digits long. Something like this (of
          course you'd then have to entirely reindex)<br>
        </span></span></p>
    <p><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # First approximation is if this word is over or
        equal</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # to the minimum size set in SiteInfo.</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; my $ok = $wordlen &gt;=
        $c-&gt;{indexing}-&gt;{freetext_min_word_size};</tt><tt><br>
      </tt></p>
    <p><tt><font color="#ff0000">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; if( $word =~ m/^\d&#43;$/ ) {<br>
          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ok = 1;<br>
          &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; </font></tt><br>
    </p>
    <div class="moz-cite-prefix">On 30/04/2020 08:27, Yuri via
      Eprints-tech wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:EMEW3|b966302d0df9e000a031a1f8b6e8872cw3Y8YW14eprints-tech-bounces|ecs.soton.ac.uk|d32bf79e-5ac1-3c16-f6d0-c890b0b95c0d@alfa.it">
      
      <p>Hi!</p>
      <p>&nbsp;I've found that the virus can be referred also as &quot;SARS COV-2&quot;
        so maybe you can add also this. But beware that Eprints search
        has a problem with -, it split the word using it.<br>
      </p>
      <div class="moz-cite-prefix">Il 27/04/20 17:06, James Kerwin via
        Eprints-tech ha scritto:<br>
      </div>
      <blockquote type="cite" cite="mid:EMEW3|942a457e724595d3b487147e73b60d14w3QG9014eprints-tech-bounces|ecs.soton.ac.uk|CAKkNZ9Bp5Hpsxb-G9oKRtnn6-pHfcG10ob8mfYBkQ-KFcAF6Sw@mail.gmail.com">
        <div dir="ltr">Hello All,<br>
          <div><br>
          </div>
          <div>I hope everyone is well in body and mind.</div>
          <div><br>
          </div>
          <div>I need some help with the EPrints search function. I have
            been asked to add a box to the repository homepage that
            lists the latest coronavirus-related deposits.</div>
          <div><br>
          </div>
          <div>I'm hoping to search via keywords for &quot;coronavirus&quot; and
            &quot;covid-19&quot;. I also want to search for either of these terms
            in titles. To do this I'm currently butchering&nbsp;a copy of
            cgi/latest_tool.</div>
          <div><br>
          </div>
          <div>I can get the keywords part to work using:</div>
          <div><br>
          </div>
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
            <blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
              <blockquote style="margin:0 0 0
                40px;border:none;padding:0px">
                <div>$c-&gt;{latest_rona_modes} = {</div>
              </blockquote>
            </blockquote>
            <blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
              <blockquote style="margin:0 0 0
                40px;border:none;padding:0px">
                <div> default =&gt; { citation =&gt; &quot;noauth&quot; },</div>
              </blockquote>
            </blockquote>
            <blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
              <blockquote style="margin:0 0 0
                40px;border:none;padding:0px">
                <div> fplatest =&gt; { </div>
              </blockquote>
            </blockquote>
            <blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
              <blockquote style="margin:0 0 0
                40px;border:none;padding:0px">
                <div> citation =&gt; &quot;popular&quot;, max =&gt; 5, </div>
              </blockquote>
            </blockquote>
            <blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
              <blockquote style="margin:0 0 0
                40px;border:none;padding:0px">
                <div> #citation =&gt; &quot;result&quot;, max =&gt; 3, </div>
              </blockquote>
            </blockquote>
            <blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
              <blockquote style="margin:0 0 0
                40px;border:none;padding:0px">
                <div> filters =&gt; [</div>
              </blockquote>
            </blockquote>
            <blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
              <blockquote style="margin:0 0 0
                40px;border:none;padding:0px">
                <div> #{ meta_fields =&gt; [
                  &quot;full_text_status&quot;,&quot;full_text_status&quot; ], value =&gt;
                  (&quot;none&quot;||&quot;public&quot;) }</div>
              </blockquote>
            </blockquote>
            <blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
              <blockquote style="margin:0 0 0
                40px;border:none;padding:0px">
                <div> { meta_fields =&gt; [ &quot;keywords&quot; ], value =&gt;
                  &quot;covid-19&quot;}</div>
                <div><br>
                </div>
              </blockquote>
            </blockquote>
          </blockquote>
          This also works with &quot;title&quot; as you would expect.
          <div><br>
          </div>
          <div>What I really want is to do a search where the keywords
            can be &quot;covid-19&quot; OR &quot;coronavirus&quot; as well as including some
            allowance for adding an:</div>
          <div><br>
          </div>
          <div>&nbsp;&quot;OR title LIKE '%covid-19%' OR title LIKE 'coronavirus'
            in MYSQL-speak.</div>
          <div><br>
          </div>
          <div>Am I able to do this using the&nbsp;EPrints::Search plugin?
            I've tried reading the codumentation and experimenting with
            it, but I'm not getting very far.</div>
          <div><br>
          </div>
          <div>If it's not possible I can think of a number of bodges
            for it, but decided it was best to attempt the proper way
            first.</div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div>James</div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7C2869087cc1a6427a613c08d7ece0a485%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oHll7MzmLQ%2B9xVFblp555zPkypUvEWSLQ3IM9fYvIQs%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="w3R5DHB8xCIiggOf7/WGtRHe3k0Ab2fp/M2xGXgAxMoixEU1YlExwhs0Pvh6CAOpnLOLBMvY2h8fL06Pfc8wBaiN5H99sBAyz1q39oKciOcfZFJ+4BnESOZnONMjOUO92n/z8PLgBB5/LbpVALLryBE+JVGlCdd066X2kE6vCMs=">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7C2869087cc1a6427a613c08d7ece0a485%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=pMk3%2Fok7vYtg7e7O9xGKzP6HmZGYxw8aaFznf0pre4E%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="NxAHIfrSyQ6xk6E/BGupI66yfpnVaUxQx/YmHgmKIiBR5elc1jC7Po8rJ/9qRmINcYrJMvq7WVhDgaZiHgmiNooo9+3+RUIQMSl+z7RVgBGfTyK/eeAow44cYMAFTtS0TWw1fCf5HJ1o6pzV5uHCrNzltJw26YxUNfTsypQfHZI=">http://wiki.eprints.org/</a></pre>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7C2869087cc1a6427a613c08d7ece0a485%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oHll7MzmLQ%2B9xVFblp555zPkypUvEWSLQ3IM9fYvIQs%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="w3R5DHB8xCIiggOf7/WGtRHe3k0Ab2fp/M2xGXgAxMoixEU1YlExwhs0Pvh6CAOpnLOLBMvY2h8fL06Pfc8wBaiN5H99sBAyz1q39oKciOcfZFJ+4BnESOZnONMjOUO92n/z8PLgBB5/LbpVALLryBE+JVGlCdd066X2kE6vCMs=">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7C2869087cc1a6427a613c08d7ece0a485%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=pMk3%2Fok7vYtg7e7O9xGKzP6HmZGYxw8aaFznf0pre4E%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="NxAHIfrSyQ6xk6E/BGupI66yfpnVaUxQx/YmHgmKIiBR5elc1jC7Po8rJ/9qRmINcYrJMvq7WVhDgaZiHgmiNooo9+3+RUIQMSl+z7RVgBGfTyK/eeAow44cYMAFTtS0TWw1fCf5HJ1o6pzV5uHCrNzltJw26YxUNfTsypQfHZI=">http://wiki.eprints.org/</a></pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Christopher Gutteridge <a class="moz-txt-link-rfc2396E" href="mailto:totl@soton.ac.uk">&lt;totl@soton.ac.uk&gt;</a> 
You should read our team blog at <a class="moz-txt-link-freetext" href="http://blog.soton.ac.uk/webteam/">http://blog.soton.ac.uk/webteam/</a></pre>
  </body>
</html>