Call number sorting

First, thanks to all who helped me get started on this library cataloguing project. I've been happily generating entries from ISBM, SBN or manually and assigning Dewey call numbers.

However, the sort order looks a little funny! Examples:
005.1 005.2 005.4 005.7 005.13/ADA ... and later:
621.9 621.37 621.42 621.092 621.381 ... or:
942.05 642.5 642.05 ... 942.07 942.8 942.009
It looks as though the sort algorithm is ignoring embedded zeros, though that doesn't explain the first line. For each of the numbers above there are several books which correctly collate together, just that the resultant groups are in the wrong order.

Not a major issue at the moment, but certainly a minor niggle.
  • It looks to me like it is sorting numbers after the decimal as if they are normal numbers. So in your first example, 13 is a larger number than 7. In the second example, it is sorting so that one-digit decimals go first, then two-digits etc. So 092 is being treated as a larger number because it has three digits than 42.
  • I think you're right. In the last example the number of digits dosn't matter since 92 is larger than 42 even without the zero. If I strip off the integer parts and leading zeros the examples are:
    1 2 4 7 13/ADA
    9 37 42 92 381
    5 5 5 ... 7 8 9

    As I said, not a major issue at the moment, but certainly a minor niggle, something that needs to be flagged up for fixing at some time in the future if possible.
  • Should I raise this as an error, and if so how?
  • Posting here is reporting it.

    This is referring to sorting in the items list?
  • Yes Dstillman. I use Dewey in the call number field and when I sort on the call number I see for instance 621.42 is followed by 621.092. Joycekwc spotted the problem, it is sorting first by the integer part and then by the decimal part, but treating that as a integer; in this case 42 and 092->92. Because of the way Dewey numbers build this can lead to an odd ordering. For example Rolt's biography of Isambard Kingdom Brunel is classed at 620.00924 (Engineering and allied operations -> Biography -> Persons) yet files after "Dynamics; Engineering Mechanics" which is classed at 620.104 since 104 is less than924. In history (which is the largest section) we have oddities such as "Capetian France, 987-1328" following "Napoleon and Europe" when it's a 1,000 years earlier!

    As I mentioned above, this is not a show-stopper and certainly not an urgent problem for me. It is however a bug to add to your list for a solution at some time in the future (whenever that is). Indeed now I understand the logic of what's happening I can easily scan ahead down the catalogue, I'll instruct the others accordingly.
Sign In or Register to comment.