Sort field inconsistency?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Sort field inconsistency?

Tod Olson
VuFind tech,

We've noticed an inconsistency with the sort fields in the default configuration. Comments below refer to the current master on github.

For author sorting, author_sort is defined in solr/vufind/biblio/conf/schema.xml and is populated in import/marc.properties. But config/vufind/searches.ini references sort_author. Similarly, there's a disconnect between title_sort and sort_title. sort_year, referenced in searches.ini, is not found in schema.xml.

In fact, you can even see that the comment in lines 153-155 of searches.ini refers to the first form, but the [Sorting] stanza refers to the second form. Maybe there was a change of convention that was partially reverted at some point?

Which is the preferred naming convention for the sort fields.?

-Tod





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: Sort field inconsistency?

Demian Katz
Tod,

The sort_title, sort_year, etc. in searches.ini are translation strings. The actual sort types are on the left side of the equal sign.

This is made more complicated by the fact that this function maps sort values to Solr fields:

https://github.com/vufind-org/vufind/blob/master/module/VuFind/src/VuFind/Search/Solr/Params.php#L445

So this all should be working correctly -- it's just decidedly confusing.

The answer is probably to adjust searches.ini so that its values match the Solr field names, and adjust the normalizeSort() method so that it works correctly with those values (preferably while also maintaining backward compatibility with the old aliases so we don't blow up legacy configurations).

If anyone on your end has time and interest in putting together a pull request for further discussion, that would be great. If you don't have time but still want to see this happen, feel free to at least open a JIRA ticket so we don't forget about it.

Additionally, if you have an example of something being actually broken beyond the general confusion explained above, please let me know so I can investigate further.

I hope this helps clear things up.

- Demian

-----Original Message-----
From: Tod Olson [mailto:[hidden email]]
Sent: Thursday, May 25, 2017 1:24 PM
To: vufind-tech
Subject: [VuFind-Tech] Sort field inconsistency?

VuFind tech,

We've noticed an inconsistency with the sort fields in the default configuration. Comments below refer to the current master on github.

For author sorting, author_sort is defined in solr/vufind/biblio/conf/schema.xml and is populated in import/marc.properties. But config/vufind/searches.ini references sort_author. Similarly, there's a disconnect between title_sort and sort_title. sort_year, referenced in searches.ini, is not found in schema.xml.

In fact, you can even see that the comment in lines 153-155 of searches.ini refers to the first form, but the [Sorting] stanza refers to the second form. Maybe there was a change of convention that was partially reverted at some point?

Which is the preferred naming convention for the sort fields.?

-Tod





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7Cb9389385484449a2df8308d4a393a1ff%7C765a8de5cf9444f09cafae5bf8cfa366%7C0%7C0%7C636313301853934631&sdata=XgPyfPn3CAl24kAVmSZxm76GCTIMP%2BK6n0IYjZBYXbY%3D&reserved=0
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7Cb9389385484449a2df8308d4a393a1ff%7C765a8de5cf9444f09cafae5bf8cfa366%7C0%7C0%7C636313301853944644&sdata=OKyGWu4RgxFriAXk7nPZATw1nJBwPWqvGsuXw8r3NPQ%3D&reserved=0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: Sort field inconsistency?

Tod Olson
Hi Demian,

That helps explain the confusion, and I probably knew that once upon a time.

We also discovered that one of the sort fields disappeared from our schema.xml and *.properties files at some point, adding to the confusion.

Thanks for helping to remove confusion!

-Tod

> On May 25, 2017, at 1:59 PM, Demian Katz <[hidden email]> wrote:
>
> Tod,
>
> The sort_title, sort_year, etc. in searches.ini are translation strings. The actual sort types are on the left side of the equal sign.
>
> This is made more complicated by the fact that this function maps sort values to Solr fields:
>
> https://github.com/vufind-org/vufind/blob/master/module/VuFind/src/VuFind/Search/Solr/Params.php#L445
>
> So this all should be working correctly -- it's just decidedly confusing.
>
> The answer is probably to adjust searches.ini so that its values match the Solr field names, and adjust the normalizeSort() method so that it works correctly with those values (preferably while also maintaining backward compatibility with the old aliases so we don't blow up legacy configurations).
>
> If anyone on your end has time and interest in putting together a pull request for further discussion, that would be great. If you don't have time but still want to see this happen, feel free to at least open a JIRA ticket so we don't forget about it.
>
> Additionally, if you have an example of something being actually broken beyond the general confusion explained above, please let me know so I can investigate further.
>
> I hope this helps clear things up.
>
> - Demian
>
> -----Original Message-----
> From: Tod Olson [mailto:[hidden email]]
> Sent: Thursday, May 25, 2017 1:24 PM
> To: vufind-tech
> Subject: [VuFind-Tech] Sort field inconsistency?
>
> VuFind tech,
>
> We've noticed an inconsistency with the sort fields in the default configuration. Comments below refer to the current master on github.
>
> For author sorting, author_sort is defined in solr/vufind/biblio/conf/schema.xml and is populated in import/marc.properties. But config/vufind/searches.ini references sort_author. Similarly, there's a disconnect between title_sort and sort_title. sort_year, referenced in searches.ini, is not found in schema.xml.
>
> In fact, you can even see that the comment in lines 153-155 of searches.ini refers to the first form, but the [Sorting] stanza refers to the second form. Maybe there was a change of convention that was partially reverted at some point?
>
> Which is the preferred naming convention for the sort fields.?
>
> -Tod
>
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.link%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7Cb9389385484449a2df8308d4a393a1ff%7C765a8de5cf9444f09cafae5bf8cfa366%7C0%7C0%7C636313301853934631&sdata=XgPyfPn3CAl24kAVmSZxm76GCTIMP%2BK6n0IYjZBYXbY%3D&reserved=0
> _______________________________________________
> Vufind-tech mailing list
> [hidden email]
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemian.katz%40villanova.edu%7Cb9389385484449a2df8308d4a393a1ff%7C765a8de5cf9444f09cafae5bf8cfa366%7C0%7C0%7C636313301853944644&sdata=OKyGWu4RgxFriAXk7nPZATw1nJBwPWqvGsuXw8r3NPQ%3D&reserved=0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Reply | Threaded
Open this post in threaded view
|

Re: Sort field inconsistency?

Demian Katz
Glad to help -- and like I say, this definitely is an area where we could stand to improve. It has grown organically over the years to the point where it is a bit crazy. Sadly, I lack time to deal with it right away, but we should get this on the agenda as a "sooner or later" thing!

- Demian

-----Original Message-----
From: Tod Olson [mailto:[hidden email]]
Sent: Thursday, May 25, 2017 3:08 PM
To: Demian Katz
Cc: Tod Olson; vufind-tech
Subject: Re: Sort field inconsistency?

Hi Demian,

That helps explain the confusion, and I probably knew that once upon a time.

We also discovered that one of the sort fields disappeared from our schema.xml and *.properties files at some point, adding to the confusion.

Thanks for helping to remove confusion!

-Tod

> On May 25, 2017, at 1:59 PM, Demian Katz <[hidden email]> wrote:
>
> Tod,
>
> The sort_title, sort_year, etc. in searches.ini are translation strings. The actual sort types are on the left side of the equal sign.
>
> This is made more complicated by the fact that this function maps sort values to Solr fields:
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu
> b.com%2Fvufind-org%2Fvufind%2Fblob%2Fmaster%2Fmodule%2FVuFind%2Fsrc%2F
> VuFind%2FSearch%2FSolr%2FParams.php%23L445&data=02%7C01%7Cdemian.katz%
> 40villanova.edu%7Cc8044aa24a6a450ef22608d4a3a1983f%7C765a8de5cf9444f09
> cafae5bf8cfa366%7C0%7C0%7C636313361815596311&sdata=knb9bPwAKytaAon5h3j
> EcRskglOJMB6R0Ajgfse%2Fcz8%3D&reserved=0
>
> So this all should be working correctly -- it's just decidedly confusing.
>
> The answer is probably to adjust searches.ini so that its values match the Solr field names, and adjust the normalizeSort() method so that it works correctly with those values (preferably while also maintaining backward compatibility with the old aliases so we don't blow up legacy configurations).
>
> If anyone on your end has time and interest in putting together a pull request for further discussion, that would be great. If you don't have time but still want to see this happen, feel free to at least open a JIRA ticket so we don't forget about it.
>
> Additionally, if you have an example of something being actually broken beyond the general confusion explained above, please let me know so I can investigate further.
>
> I hope this helps clear things up.
>
> - Demian
>
> -----Original Message-----
> From: Tod Olson [mailto:[hidden email]]
> Sent: Thursday, May 25, 2017 1:24 PM
> To: vufind-tech
> Subject: [VuFind-Tech] Sort field inconsistency?
>
> VuFind tech,
>
> We've noticed an inconsistency with the sort fields in the default configuration. Comments below refer to the current master on github.
>
> For author sorting, author_sort is defined in solr/vufind/biblio/conf/schema.xml and is populated in import/marc.properties. But config/vufind/searches.ini references sort_author. Similarly, there's a disconnect between title_sort and sort_title. sort_year, referenced in searches.ini, is not found in schema.xml.
>
> In fact, you can even see that the comment in lines 153-155 of searches.ini refers to the first form, but the [Sorting] stanza refers to the second form. Maybe there was a change of convention that was partially reverted at some point?
>
> Which is the preferred naming convention for the sort fields.?
>
> -Tod
>
>
>
>
>
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org!
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsdm.li
> nk%2Fslashdot&data=02%7C01%7Cdemian.katz%40villanova.edu%7Cb9389385484
> 449a2df8308d4a393a1ff%7C765a8de5cf9444f09cafae5bf8cfa366%7C0%7C0%7C636
> 313301853934631&sdata=XgPyfPn3CAl24kAVmSZxm76GCTIMP%2BK6n0IYjZBYXbY%3D
> &reserved=0 _______________________________________________
> Vufind-tech mailing list
> [hidden email]
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists
> .sourceforge.net%2Flists%2Flistinfo%2Fvufind-tech&data=02%7C01%7Cdemia
> n.katz%40villanova.edu%7Cb9389385484449a2df8308d4a393a1ff%7C765a8de5cf
> 9444f09cafae5bf8cfa366%7C0%7C0%7C636313301853944644&sdata=OKyGWu4RgxFr
> iAXk7nPZATw1nJBwPWqvGsuXw8r3NPQ%3D&reserved=0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech