Bug 13722

Summary: Titles with articles not sorting correctly in lists
Product: Koha Reporter: Jesse Maseto <jesse>
Component: ListsAssignee: Galen Charlton <gmcharlt>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: adzmau, aholt, fiona.borthwick, flyingendpaper, hc, horganl, koha, lauren_denny, lucy.vaux-harvey, m.de.rooy, marjorie.barry-vila, maude.boudreau, patrick.robitaille, snicker1, yolanda.marcos
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Jesse Maseto 2015-02-17 21:40:03 UTC
We've noticed that in lists sorted by title, titles with articles, e.g., that being with "The..." are sorting under the article even though the second indicator of the 245 field is set correctly.  E.g. this list, "Lighthouses (West Coast)":

http://keys.bywatersolutions.com/cgi-bin/koha/opac-shelves.pl?sortfield=title&viewshelf=66&itemoff=3
Comment 1 Owen Leonard 2015-02-19 13:39:54 UTC
This bug could just as easily be titled "Teach Koha how to ignore nonfiling characters," because Koha doesn't take nonfiling characters into account at all. As far as I understand it, Zebra can be configured to ignore certain stop words, and some tables which are sorted by JavaScript are configured to ignore articles on titles. Anything which is sorted by MySQL is going to be ignorant of stop words or nonfiling characters.
Comment 2 Holly 2020-02-14 10:24:04 UTC
Based on the last comment there doesn't seem much can be done for this right now, but I wanted to register that there is still interest in it.
Comment 3 Laura Horgan 2020-06-22 17:07:22 UTC
Looks like this was fixed with elasticsearch so wondering if someone should look at this one as well bug number 22771
Comment 4 Katrin Fischer 2020-06-22 20:38:57 UTC
(In reply to Laura Horgan from comment #3)
> Looks like this was fixed with elasticsearch so wondering if someone should
> look at this one as well bug number 22771

This is a different problem here:
Result lists can sort correctly depending on the indicators of 245 for Zebra and Elasticsearch, but the lists result set is not created using either of those. It's created with SQL and therefore we need a completely different fix here.
Comment 5 Lucy Vaux-Harvey 2020-09-15 10:00:08 UTC
This issue has also been reported by one of our customers.  It would be great to have a fix so that the second indicator was taken into account.
Comment 6 Katrin Fischer 2020-09-15 10:08:15 UTC
I think the best we could do here is probably to use the anti-the list, that we have for other SQL based title lists? Only the search results from Zebra/Elasticsearch can use the indicators.
Comment 7 Abbey Holt 2021-03-10 19:41:26 UTC
I second Holly and Lucy. We would love to see this, too!
Comment 8 adzmau 2024-02-16 19:41:15 UTC
It'd be great to see this issue fixed, so that the second indicator was taken into account. Titles with articles are incorrectly sorting in my Lists.
Comment 9 Owen Leonard 2024-07-17 16:31:43 UTC
Do we need to add a "title-sortable" column to the biblio table? We could use the non-filing characters indicator on the 245 field to build it. That would allow us to sort results coming directly from SQL and to use the same sorting for DataTables. And it would make it more language-agnostic than the "anti-the" option in DataTables since we wouldn't have to predefine all possible articles to ignore.
Comment 10 Heather 2024-07-17 17:01:15 UTC
I don't understand everything in this comment, but anything that says, "use the non-filing characters indicator on the 245 field" sounds good to me!!!!

--h2
Comment 11 Katrin Fischer 2024-07-18 11:13:48 UTC
(In reply to Owen Leonard from comment #9)
> Do we need to add a "title-sortable" column to the biblio table? We could
> use the non-filing characters indicator on the 245 field to build it. That
> would allow us to sort results coming directly from SQL and to use the same
> sorting for DataTables. And it would make it more language-agnostic than the
> "anti-the" option in DataTables since we wouldn't have to predefine all
> possible articles to ignore.

I am not keen on another column, but I see no better way to achieve this and we cannot keep up with the anti-the for libraries with many different languages.