<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Tomasz,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Glad you could use what I posted.&nbsp; &nbsp;I&#8217;m not sure if the wiki needs updating as I&#8217;m not sure what the config should be without Xapian vs. with Xapian &#8211; I&#8217;ll leave that with Adam.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Brian.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Tomasz Neugebauer<br>
<b>Sent:</b> Tuesday, September 01, 2015 11:30 AM<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] Re: Relevance ranking for Simple and Advanced Search<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">Dear Brian,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">&nbsp;</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">Thank you for this information!&nbsp; I was having trouble getting the advanced search to use relevance sort, and your post solved it for me.
</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">I think that relevance sort is what users expect as a default sort.</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">Should we update the simple and advanced search config examples here:
<a href="http://wiki.eprints.org/w/Search.pl">http://wiki.eprints.org/w/Search.pl</a> to use relevance sort by default?</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">&nbsp;</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">Tomasz</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">&nbsp;</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">&nbsp;</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Courier New&quot;,serif;color:#A6A6A6;mso-fareast-language:EN-CA">________________________________________________</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:17.85pt">
<span lang="EN-CA" style="font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:black">Tomasz Neugebauer<span style="background:white"><br>
</span>Digital Projects &amp; Systems Development Librarian<span style="background:white"><br>
</span>Libraries / Bibliothèques<br>
Concordia University / Université Concordia<b><br>
<br>
<br>
</b></span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">&nbsp;</span><span lang="EN-CA"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">
eprints-tech-bounces@ecs.soton.ac.uk</a> [<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>]
<b>On Behalf Of </b>Brian D. Gregg<br>
<b>Sent:</b> August-27-15 12:21 PM<br>
<b>To:</b> 'eprints-tech@ecs.soton.ac.uk' &lt;<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>&gt;<br>
<b>Subject:</b> [EP-tech] Relevance ranking for Simple and Advanced Search<span lang="EN-CA"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-CA">&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal">All,<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">Just passing this along in case anyone has been looking at searching (simple and advanced) and wondering about how to make relevance ranking results the default for at least the 3.3.12 (version we are running) of Eprints.&nbsp; As usual&#8230; your
 millage may vary.<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">In our Eprints 3.3.12 instance we changed the following files and ran &#8216;epadmin reload {archive}&#8217; to make the changes stick.<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">cfg/cfg.d/eprints_search_simple.pl:<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; preamble_phrase =&gt; &quot;cgi/search:preamble&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title_phrase =&gt; &quot;cgi/search:simple_search&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; citation =&gt; &quot;result&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; page_size =&gt; 20,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_methods =&gt; {</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;byrelevance&quot;&nbsp;&nbsp;&nbsp; =&gt; &quot;&quot;,&nbsp;
</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;byyear&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;-date/creators_name/title&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;byyearoldest&quot;&nbsp;&nbsp; =&gt; &quot;date/creators_name/title&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;byname&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=&gt; &quot;creators_name/-date/title&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;bytitle&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;title/creators_name/-date&quot;</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #default_order =&gt; &quot;byyear&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default_order =&gt; &quot;byrelevance&quot;,&nbsp;
</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show_zero_results =&gt; 1,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">cfg/cfg.d/eprints_search_advanced.pl:<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; preamble_phrase =&gt; &quot;cgi/advsearch:preamble&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title_phrase =&gt; &quot;cgi/advsearch:adv_search&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; citation =&gt; &quot;result&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; page_size =&gt; 20,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_methods =&gt; {</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;byrelevance&quot;&nbsp;&nbsp;&nbsp; =&gt; &quot;&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;byyear&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;-date/creators_name/title&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;byyearoldest&quot;&nbsp;&nbsp; =&gt; &quot;date/creators_name/title&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;byname&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;creators_name/-date/title&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;bytitle&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;title/creators_name/-date&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;byid&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;eprintid&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #default_order =&gt; &quot;byyear&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default_order =&gt; &quot;byrelevance&quot;,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show_zero_results =&gt; 1,</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">By adding the &#8220;byrelevance&#8221; line to the order_methods and setting the default_order to &#8220;byrelevance&#8221; we now have relevance ranking search results for both our simple and advanced searches by default.
<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">Hope this helps,<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">Thanks,<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">Brian.<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:18.0pt;color:#323E4F">Brian D. Gregg</span></b><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span style="font-size:14.0pt;color:#323E4F">Solutions Architect
</span></i><span style="font-size:14.0pt;color:#323E4F">|<i> Manager Systems Development</i></span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#323E4F">University of Pittsburgh | University Library System</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#323E4F">Address: <a href="https://maps.google.com/maps?q=7500&#43;Thomas&#43;Blvd,&#43;Pittsburgh,&#43;PA&amp;hl=en&amp;sll=41.117935,-77.604698&amp;sspn=7.662465,13.73291&amp;oq=7500&#43;Tho&amp;t=h&amp;hnear=7500&#43;Thomas&#43;Blvd,&#43;Pittsburgh,&#43;Pennsylvania&#43;15208&amp;z=17" target="_blank">
7500 Thomas Blvd.&nbsp; Room 129 Pittsburgh, PA 15208</a></span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#17365D">Tel: (412) 648-3264 | Email: <a href="mailto:bdgregg@pitt.edu">
bdgregg@pitt.edu</a> | Fax: (412) 648-3585</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;<span lang="EN-CA"><o:p></o:p></span></p>
</div>
</body>
</html>