Skip to first unread message

Evgeny Enikeev

unread,
May 9, 2024, 7:15:53 AMMay 9
to AtoM Users
Hello
Please tell me how I can change the sorting of items in the filters on the left (Occupation, Place, Subject) in the Authority record (on the page /index.php/actor/browse). Now these items are sorted by the number of records associated with this item, but the sorting needs to be alphabetical.
And I would also like to make sure that the items in the "Subject" section are displayed taking into account the hierarchy that is used in the corresponding taxonomy.
Actor-browse-title.png
I didn't find these settings in the user interface. Can you please tell me which files contain the corresponding parts of the code? If you can suggest the corrected code, that will be the best!
Thank you.

Dan Gillean

unread,
May 9, 2024, 9:04:21 AMMay 9
to ica-ato...@googlegroups.com
Hi there Evgeny, 

Making the changes you want will likely require significant customization - beyond the level our team can help with via the forum, unfortunately. I can try to give you some initial pointers as to where to look to find code related to this, but you will likely need to figure out what to  modify where yourself. 

In Elasticsearch 5.6, I believe that the facets are powered by what is known as aggregations: 
I am not 100% sure, but I think what you will want to look at first will be term aggregations: 
In AtoM, much of Elasticsearch is configured via the arElasticsearchPlugin - this is where you will find most ES-related code and index mappings: 
For example, the mapping of what AtoM fields are indexed (and how) is in this configuration file: 
While the ES analyzers and tokenizers used are defined in this configuration file: 
Meanwhile, there are functions defined in the plugin related to handling aggregations - you can search for "aggregation" or "aggs" in the code repository to find some relevant spots. For example, here are two functions related to aggregations: 
The general structure of the factets as a sidebar is defined in a partial that is reused in many places in AtoM - see: 
Now, on the actual Authority record browse page, here is the browse template defining the facets (aggregations) shown: 
Then there is the styling of these, in the relevant theme plugin - here is the Actor (i.e. authority record) browse page template in the newer Bootstrap 5 Dominion theme: 
Unfortunately, beyond finding these starting points, that is all the help I can personally provide at present. I will see if the developers have any additional suggestions for starting points, but my suggestion would be to first understand how aggregations work in ES 5.6, then figure out how we've used them in AtoM - that should help you figure out what is possible, and eventually what to change. 

Good luck! 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/c57817fc-c868-44f7-a2ac-70279422b547n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages