<div dir="ltr">For what it's worth, we also use Latin script language and find the results more relevant without a star, or at least with the queries of 17.05 :).<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-04 13:10 GMT+02:00 Nick Clemens <span dir="ltr"><<a href="mailto:nick@bywatersolutions.com" target="_blank">nick@bywatersolutions.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Interesting, yes, the star was added to support auto_truncation and enabled by default. For languages using latin scripts we need the star, otherwise a search for "cat" will not return results containing "cats"</div><div><br></div><div>I am not sure what the path to correcting this is - I think you should file a bug report with this info and we can take a deeper look into how we are building our searches and what we can do.<br></div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Tue, Apr 3, 2018 at 10:22 AM Nicolas Legrand <<a href="mailto:nicolas.legrand@bulac.fr" target="_blank">nicolas.legrand@bulac.fr</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Good day devs,<br><br></div><div>Nick spotted these one during last Marseille Hackfest. We made some test with our catalogue on master and find out how to reproduce it, how to break it and how to fix it, though the inner mechanics remains a mystery and we are not quite sure about what the default behaviour should be.<br></div><div><div><br>We did our test with 中國翻譯 (Chinese Translators Journal) which have two words highly present in our Catalog: China and translation.<br><br>First, the default Koha behaviour is to add a "*" at the end of the searched word, which lead to 0 results. It produces a query looking like this one:<br><br>$ curl  "<a href="http://localhost:9200/koha_robin_biblios/_search?pretty" target="_blank">http://localhost:9200/koha_<wbr>robin_biblios/_search?pretty</a>" -d '{"from": 0, "size": 0,"query":{"query_string":{"<wbr>query": "中國翻譯*"}}}'<br>{<br>  "took" : 1,<br>  "timed_out" : false,<br>  "_shards" : {<br>    "total" : 5,<br>    "successful" : 5,<br>    "skipped" : 0,<br>    "failed" : 0<br>  },<br>  "hits" : {<br>    "total" : 0,<br>    "max_score" : 0.0,<br>    "hits" : [ ]<br>  }<br>}<br><br>If we quote 中國翻譯 in Koha, it yields one answer, the right one. It produces a query looking like this one:<br><br>$ curl  "<a href="http://bouse02.prive.bulac.fr:9200/koha_robin_biblios/_search?pretty" target="_blank">http://bouse02.prive.bulac.<wbr>fr:9200/koha_robin_biblios/_<wbr>search?pretty</a>" -d '{"from": 0, "size": 0,"query":{"query_string":{"<wbr>query": "\"中國翻譯\""}}}'<br>{<br>  "took" : 5,<br>  "timed_out" : false,<br>  "_shards" : {<br>    "total" : 5,<br>    "successful" : 5,<br>    "skipped" : 0,<br>    "failed" : 0<br>  },<br>  "hits" : {<br>    "total" : 1,<br>    "max_score" : 0.0,<br>    "hits" : [ ]<br>  }<br>}<br><br>Note that if I write an Elasticsearch query without quotes or star, it yields too much results (9626), the “right” result isn't in the ten first results:<br><br>$ curl  "<a href="http://bouse02.prive.bulac.fr:9200/koha_robin_biblios/_search?pretty" target="_blank">http://bouse02.prive.bulac.<wbr>fr:9200/koha_robin_biblios/_<wbr>search?pretty</a>" -d '{"from": 0, "size": 0,"query":{"query_string":{"<wbr>query": "中國翻譯"}}}'<br>{<br>  "took" : 16,<br>  "timed_out" : false,<br>  "_shards" : {<br>    "total" : 5,<br>    "successful" : 5,<br>    "skipped" : 0,<br>    "failed" : 0<br>  },<br>  "hits" : {<br>    "total" : 9626,<br>    "max_score" : 0.0,<br>    "hits" : [ ]<br>  }<br>}<br><br><br>I'm not sure what the right behaviour needs to be. We felt adding quotes added a lot of relevance to our results no matter what the language is. What is certain is that adding a star to the search by default doesn't help us. We didn't have the problem with Elasticsearch while playing with it in 17.05. For us, it is a regression. I add the MARC of our test record.<br><br></div><div>What do you think about it?<br><br></div><div>Best regards,<br clear="all"></div><div><br>-- <br><div class="m_-76854379401739809m_-413133116177730073gmail_signature"><div>
        <br>
        <span><b>Nicolas Legrand</b></span></div>
<div>
        <span>Administration technique et développements du système de gestion de la bibliothèque</span></div>
<br>
<div>
        <span><img alt="Logo BULAC" src="http://www.bulac.fr/a/img/logo-bulac-mail.png" style="width:200px;height:60px"></span></div>
<div>
         </div>
<div>
        <span style="color:rgb(255,94,14)"><span><span>Bibliothèque universitaire </span></span></span></div>
<div>
        <span style="color:rgb(255,94,14)"><span><span>des langues et civilisations</span></span></span><br>
         </div>
<div>
        <span><a href="https://maps.google.com/?q=65+rue+des+Grands+Moulins&entry=gmail&source=g">65 rue des Grands Moulins</a></span></div>
<div>
        <span>F-75013 PARIS</span></div>
<div>
        <span>T +33 1 81 69 <b>18 22</b></span></div>
<div>
        <a href="http://www.bulac.fr" target="_blank">www.bulac.fr</a></div></div>
</div></div></div></div></div>
______________________________<wbr>_________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-<wbr>community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.<wbr>org/cgi-bin/mailman/listinfo/<wbr>koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.<wbr>org/</a></blockquote></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr" class="m_-76854379401739809gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div>Nick Clemens<br></div>Sonic Screwdriver (Development Support)<br></div>ByWater Solutions<br></div>IRC: kidclamp<br></div></div>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div>
        <br>
        <span style="font-family:courier new,courier,monospace"><strong>Nicolas Legrand</strong></span></div>
<div>
        <span style="font-family:courier new,courier,monospace">Administration technique et développements du système de gestion de la bibliothèque</span></div>
<br>
<div>
        <span style="font-family:courier new,courier,monospace"><img alt="Logo BULAC" src="http://www.bulac.fr/a/img/logo-bulac-mail.png" style="width:200px;height:60px"></span></div>
<div>
         </div>
<div>
        <span style="color:#ff5e0e"><span><span style="font-family:courier new,courier,monospace">Bibliothèque universitaire </span></span></span></div>
<div>
        <span style="color:#ff5e0e"><span><span style="font-family:courier new,courier,monospace">des langues et civilisations</span></span></span><br>
         </div>
<div>
        <span style="font-family:courier new,courier,monospace">65 rue des Grands Moulins</span></div>
<div>
        <span style="font-family:courier new,courier,monospace">F-75013 PARIS</span></div>
<div>
        <span style="font-family:courier new,courier,monospace">T +33 1 81 69 <strong>18 22</strong></span></div>
<div>
        <a href="http://www.bulac.fr" target="_blank">www.bulac.fr</a></div></div>
</div>