EPrints Technical Mailing List Archive
Message: #04621
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Relevance ranking for Simple and Advanced Search
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Relevance ranking for Simple and Advanced Search
- From: "Brian D. Gregg" <bdgregg@pitt.edu>
- Date: Tue, 1 Sep 2015 16:14:50 +0000
Tomasz, Glad you could use what I posted. I’m not sure if the wiki needs updating as I’m not sure what the config should be without Xapian vs. with Xapian – I’ll leave that with Adam. -Brian. From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Tomasz Neugebauer Dear Brian, Thank you for this information! I was having trouble getting the advanced search to use relevance sort, and your post solved it for me.
I think that relevance sort is what users expect as a default sort. Should we update the simple and advanced search config examples here:
http://wiki.eprints.org/w/Search.pl to use relevance sort by default? Tomasz ________________________________________________
Tomasz Neugebauer From:
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Brian D. Gregg All, 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. As usual… your
millage may vary. In our Eprints 3.3.12 instance we changed the following files and ran ‘epadmin reload {archive}’ to make the changes stick. cfg/cfg.d/eprints_search_simple.pl: preamble_phrase => "cgi/search:preamble", title_phrase => "cgi/search:simple_search", citation => "result", page_size => 20, order_methods => { "byrelevance" => "",
"byyear" => "-date/creators_name/title", "byyearoldest" => "date/creators_name/title", "byname" => "creators_name/-date/title", "bytitle" => "title/creators_name/-date" }, #default_order => "byyear", default_order => "byrelevance",
show_zero_results => 1, cfg/cfg.d/eprints_search_advanced.pl: preamble_phrase => "cgi/advsearch:preamble", title_phrase => "cgi/advsearch:adv_search", citation => "result", page_size => 20, order_methods => { "byrelevance" => "", "byyear" => "-date/creators_name/title", "byyearoldest" => "date/creators_name/title", "byname" => "creators_name/-date/title", "bytitle" => "title/creators_name/-date", "byid" => "eprintid", }, #default_order => "byyear", default_order => "byrelevance", show_zero_results => 1, By adding the “byrelevance” line to the order_methods and setting the default_order to “byrelevance” we now have relevance ranking search results for both our simple and advanced searches by default.
Hope this helps, Thanks, Brian. Brian D. Gregg Solutions Architect
| Manager Systems Development University of Pittsburgh | University Library System Address:
7500 Thomas Blvd. Room 129 Pittsburgh, PA 15208 Tel: (412) 648-3264 | Email:
bdgregg@pitt.edu | Fax: (412) 648-3585 |
- References:
- [EP-tech] Relevance ranking for Simple and Advanced Search
- From: "Brian D. Gregg" <bdgregg@pitt.edu>
- [EP-tech] Re: Relevance ranking for Simple and Advanced Search
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- [EP-tech] Relevance ranking for Simple and Advanced Search
- Prev by Date: [EP-tech] Re: Relevance ranking for Simple and Advanced Search
- Next by Date: [EP-tech] Re: Relevance ranking for Simple and Advanced Search
- Previous by thread: [EP-tech] Re: Relevance ranking for Simple and Advanced Search
- Next by thread: [EP-tech] Some questions about SWORDv2/CRUD endpoint
- Index(es):