Hello Andrea, Thank you very much indeed for this information, it will be a tremendous help to us. Adam is going to make the program changes as he has become our 'technical' guru now.
We have input over a 1000 sites on our Arches EAD now, although there is still a lot of information to enter about them such as images and descriptions. But it is going well and I've started trying to compare our western desert sites with Eameana', but most of my time is spent supervising the student inputters! When they are all in Ill email you about it. Lucy On Monday, October 2, 2017 at 1:07:41 PM UTC+2, [email protected] wrote: > > Hello Lucy, > > here it goes. You will need to modify the syntax of the > build_search_results_dsl function (in app/views/search.py). I strongly > recommend that you don't alter the original Arches' search.py script but > copy that in your own app's views folder and modify that instead. > > You need to add a sorting criterion (which you can do right after the > definition of the function): > > sorting = { > "child_entities.label": { > "order" : "asc", > "nested_path": "child_entities", > "nested_filter": { > "term": {"child_entities.entitytypeid" : "[NODE YOU WISH TO SORT BY, E.G. > NAME.E41"} > } > } > } > > > > > Then, just before "return query" (the last line of the function), update > the query by adding the sorting criterion: > > query.dsl.update({'sort': sorting}) > > > > If can make this more flexible by moving the definition of your sorting > node to settings.py so that you won't have to tamper with search.py again > if you one day decide that you wish to sort results by, say, Address > instead of by Name. > > Any questions, just ask, > > Best, > > Andrea > > On Saturday, September 30, 2017 at 6:41:48 AM UTC+1, Lucy Fletcher-Jones > wrote: >> >> Hi Andrea, >> Welcome back from your travels. >> Thank you very much for the information. It will be a great help to us. >> Lucy >> >> Sent from my iPad >> >> On 29 Sep 2017, at 17:51, [email protected] wrote: >> >> Hello Lucy, >> >> Back from a long period away and going through some of the recent threads >> here. Pertaining to your point 3: >> >> You can sort your search results by any given node by modifying the >> function build_search_results_dsl in arches/app/views/search.py (I would >> encourage you to copy this file over to your app's views folder instead of >> tampering with the underlying arches source files) to add a sorting >> criterion. If this is a feature that you are still looking for, I can >> provide you with a workflow to implement it. >> >> Best, >> >> Andrea >> >> >> >> >> >> On Tuesday, August 22, 2017 at 8:58:40 AM UTC+1, Lucy Fletcher-Jones >> wrote: >>> >>> Thank you Adam - no need to apologise for taking some time to respond. I >>> will add the issues >>> the EAD repo as you suggest and one other which is also EAD package >>> specific. >>> >>> The first issue: description: it seems that you would need to hard code >>> the description you wish >>> to show up in the search results? We are using our own description >>> titles, so it would not be >>> called 'primary'. How much work is it to do this? >>> >>> Sent from my iPad >>> >>> On 21 Aug 2017, at 23:40, Adam Cox <[email protected]> wrote: >>> >>> Hi Lucy, to respond to each of these issues in order (as none of them >>> are related): >>> >>> 1. To get the desired result (which I assume is to show the "primary >>> description") would require a little extra work... Right now, I don't think >>> there is actually any check in place to find the "primary description" and >>> use it in the search results. >>> 2. There is a strong possibility that this issue is related to work I >>> did while I was at AUC; I just tested on a demo HIP installation and it >>> worked fine. It would be best if you could put that issue in the EAD repo. >>> 3. Unfortunately there is no alphabetical sorting of the search results >>> in v3 (nor in v4). >>> 4. This would require a little bit of extra work on the reports, but >>> would probably be the easiest of all to fix. I'd suggest putting an issue >>> in our repo (as this is a package-specific issue). >>> >>> Hope that's helpful, sorry for not getting to this response sooner... >>> >>> Adam >>> >>> On Tuesday, August 15, 2017 at 11:16:17 AM UTC-4, Lucy Fletcher-Jones >>> wrote: >>>> >>>> Hi All, >>>> >>>> We finally started input in June/July thanks to Adam Cox's excellent >>>> work on getting our V3.0 Arches system ready. >>>> >>>> On checking input I have found a few small problems and was hoping that >>>> there was already a fix for these. 'Im pretty certain these are problems >>>> with the standard Arches, not our customised version. If anyone has a >>>> readymade fix for these please let me know. Thank you very much, >>>> >>>> Lucy >>>> >>>> Sorry for the formatting - copied from Excel: >>>> >>>> >>>> 1. Search screen, non map When input several sections of description, >>>> only the text from the last section shows under the site name when you >>>> search for all sites. >>>> >>>> >>>> >>>> 2. Search screen >>>> On Export Results to .csv file, key error results. >>>> >>>> 3. Search Screen Site are not shown in alphabetical order >>>> >>>> 4. Resource report Site names not always being shown with primary first >>>> >>> -- >>> -- To post, send email to [email protected]. To unsubscribe, >>> send email to [email protected]. For more information, >>> visit https://groups.google.com/d/forum/archesproject?hl=en >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Arches Project" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/archesproject/qE7_EXGL19c/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >> -- To post, send email to [email protected]. To unsubscribe, >> send email to [email protected]. For more information, >> visit https://groups.google.com/d/forum/archesproject?hl=en >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "Arches Project" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/archesproject/qE7_EXGL19c/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> >> -- -- To post, send email to [email protected]. To unsubscribe, send email to [email protected]. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en --- You received this message because you are subscribed to the Google Groups "Arches Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
