EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #09878


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] sort by date in a simple search with xapian does not sort correctly


Hi Mario,

Xapian does have a bit of an oddity where it occasionally forgets how to do certain orderings.  I am looking at my development EPrints repository and the ordering by year (both most recent and oldest first) show the same ordering as by author's name, as that the secondary ordering for those options.  I believe there is a way I have fixed this in the past without having to create a new Xapian index and reindex from scratch but I cannot remember offhand.

I was looking back over the mail archive and I noted that you commented out a related warning message.  Back in July you reported the error message:

Search::Xapian can't sort by eprint.byrelevance.fr: unknown sort key


That is a bug with the code.  Some time back we added an actual value for the by relevance ordering option in search because otherwise you could not be sure this would be set as the default if specified in the search configuration.  What was not also done was to make sure this option is ignored when building the sorter for Xapian search results.  Other orderings (e.g. by title) specify title as the primary order but use author's name and year as secondary/tertiary orderers, finally if there is still a tie by relevance is used to determine the order.  By relevance is a built-in ordering mechanism for Xapian search, so does not need to be specified and does not have a sort key, which means you get an warning message like the one above.  Therefore, I will make sure the code is fixed for a future release, to avoid this unnecessary warning message being generated.

Regards

David Newman


On 15/11/2024 7:48 pm, Beaudoin, Mario wrote:
CAUTION: This e-mail originated outside the University of Southampton.
CAUTION: This e-mail originated outside the University of Southampton.

Hi all,

When i sort by date  the result of a simple search is not good.

I have the latest eprints version and use xapian for simple search.

Do you have any idea how to fix that?

or which file is used for sorting in simple search when xapian is on

and with table xapian use for sorting by date to be sure the date format is good

 

thank

 

Mario Beaudoin

 

 


*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List
*** Archive: https://www.eprints.org/tech.php/
*** EPrints community wiki: https://wiki.eprints.org/