LOC sort
LOC sort
Hi—I've just switched from Delicious Library, and I noticed that I can no longer sort properly by library of congress catalogue—the sort simply goes character by character, so that, for instance "B1290 2008" comes before "B188 .F714 1988". Is there any good solution for this?
Re: LOC sort
Thanks for the feedback. I have code explicitly looking for the LOC and sorting character by character. Now why it does that, there is no comment on the code. But there must have been a good reason, let me investigate and find out why that might be the case.
Re: LOC sort
After some searching, the LCC numbers are meant to be sorted as text and not numbers. The behavior is the correct behavior for the sorting of LCC on a shelf and library.
In a simpler example "B3" needs to come after "B19999".
In a simpler example "B3" needs to come after "B19999".
Re: LOC sort
Is this going to be fixed anytime soon? Or is there a way to manually change how the field is sorted?
Re: LOC sort
The sorting is correct.
There is no way to break the proper sorting of LCC numbers. If you want them to sort like regular numbers you could move the data to number field that is not being used, such as paid. You can do this directly in the SQL database with the following command in TerminalL
There is no way to break the proper sorting of LCC numbers. If you want them to sort like regular numbers you could move the data to number field that is not being used, such as paid. You can do this directly in the SQL database with the following command in TerminalL
Code: Select all
sqlite3 ~/Library/Application\ Support/Bookpedia/Database.bookpd
update zentry set zpaid = zlcc;
Re: LOC sort
I'm not sure I understand your response—it seems like you're saying that the LCC sorting is working already. I've attached a picture of how the sort works for my library:
http://imgur.com/dPjyzza
EDIT: On the other hand, your fix worked fine in the opposite direction, sending LCC to a custom text field.
http://imgur.com/dPjyzza
EDIT: On the other hand, your fix worked fine in the opposite direction, sending LCC to a custom text field.
Re: LOC sort
Thank you for the image. Indeed, the sorting is working correctly. I know it seems wrong to sort B1835 before B188. But this is the way LCC is sorted and the way you would find the books at the library. I.e. they are not numbers but categories; B18 is closer to category B2 than B1835.
We actually go out of our way to do this sorting on the LCC field with a custom sort. Hence why moving the data to any other custom field will suddenly sort it the way you expected with the numbers in numerical order.
We actually go out of our way to do this sorting on the LCC field with a custom sort. Hence why moving the data to any other custom field will suddenly sort it the way you expected with the numbers in numerical order.
Re: LOC sort
I see now where the confusion was. But I'm not sure you're right about the correct sorting. Sorting that way completely destroys the topical ordering of books (for instance, it puts random choral works between the piano works), I've never seen a library sort that way, and it's not how the LOC itself sorts it in their outline of the classification: https://www.loc.gov/catdir/cpso/lcco/
-
- Junior Member
- Posts: 4
- Joined: Thu Feb 15, 2007 11:49 am
Re: LOC sort
re: "... it's not how the LOC itself sorts it in their outline of the classification ..."
I just looked at that link, and the LOC list is indeed, to my eyes "sorted as text", not as numeric values.
If one thinks of the "numbers" as a "positional hierarchy" of characters, then it may make more sense.
Example: (from a LOC link sub-page, using 'periods' to approximate spacing):
ML1-3930 ... Literature on music
ML1-5 ............... Periodicals. Serials
ML12-21 ........... Directories. Almanacs
I just looked at that link, and the LOC list is indeed, to my eyes "sorted as text", not as numeric values.
If one thinks of the "numbers" as a "positional hierarchy" of characters, then it may make more sense.
Example: (from a LOC link sub-page, using 'periods' to approximate spacing):
ML1-3930 ... Literature on music
ML1-5 ............... Periodicals. Serials
ML12-21 ........... Directories. Almanacs
Re: LOC sort
Latest Bookpedia beta has a fix for LCC sort.