peterwebster / henson

Master data store for the Hensley Henson Journals project, and issue tracker. The application code is kept elsewhere.
1 stars 1 forks source link

Issue with date sorting in search results #222

Closed peterwebster closed 4 years ago

peterwebster commented 6 years ago

Possibly related to #218, but the date sorting seems to fail here. This was a search using the date picker for the whole of 1900, run from /journals

https://henson.durham.ac.uk/?utf8=%E2%9C%93&search_field=only_journals&q=&start_year=1900&start_month=1&start_day=1&end_year=1900&end_month=12&end_day=31

nomoregrapes commented 6 years ago

Technical notes, for me to continue investigating...

peterwebster commented 6 years ago

Thanks for this @nomoregrapes : we should, I think, set aside a decent length of time for this, as there are several unknowns in this.

peterwebster commented 5 years ago

In call with @nomoregrapes agreed to use the ID (derived from the XML file name) as the basis for the date search.

peterwebster commented 5 years ago

@DurHHHI @KPalmerHeathman long story, but the repository is having difficulty using the DateTo and DateFrom fields in the control sheets as a means of sorting search results. Please continue to record them, though, as they are used for other purposes.

For the purposes of the sorting however, you've done us all a favour by adopting a consistent way of composing the file name:

yy-mm-dd for files that cover a single day: eg, 05-12-24 for 24-Dec-1905

And:
yy-mm-dd-mm-dd for ranges of dates: eg. 06-02-04-02-17 for 4-Feb-1906 to 17-Feb-1906

Well done you; pat yourselves on the back, and (from now on) make this a hard and fast rule.

nomoregrapes commented 5 years ago

The make-do for journal sorting (using the id field, derived from the filename) is now on test_server.

You might want to keep this issue open, and I'll see if I can make it use DateFrom.

peterwebster commented 5 years ago

Many thanks @nomoregrapes : I haven't tested this to destruction, which I will do, but it is a great improvement on what is already on production so we should go ahead with it. Assigning to me now.

peterwebster commented 4 years ago

After 18 months of use, no further comments noted on this, so closing the issue.