Skip to content

Commit

Permalink
fix(chronology): boost function eWW
Browse files Browse the repository at this point in the history
use string based boost function

close #35
see #11
  • Loading branch information
duncdrum committed Feb 12, 2024
1 parent 2399590 commit af68a97
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
31 changes: 28 additions & 3 deletions cypress/e2e/chronology.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Chronology', () => {
// see #11

describe('Andreas Gryphius', () => {
describe('Andreas Gryphius', {tags: ['@next']}, () => {
// DP: add sort: 'year' to qs for sorted results
beforeEach(() => {
cy.visit({
Expand All @@ -17,7 +17,7 @@ describe('Chronology', () => {
// DP: sometimes the date in resultlist-data conflicts with the exact date in details view
// which can impact the percieved sorting
// see #35
it.skip('Top 1 should be published in or after 2020', () => {
it('Top 1 should be published in or after 2020', () => {
cy.get('.resultlist-data')
.first()
.contains(/202\d/)
Expand Down Expand Up @@ -246,11 +246,36 @@ describe('Chronology', () => {
// not sure if this should or should not exist
// definition of relevance?
// see #35
it.skip('should show relevant titles according to chronology', () => {
it.skip('should show relevant title', () => {
cy.get('[href*="1756833699"]')
.should('exist')
})

// PPN 389602841 2005
// PPN 430480865 1969
// see #35
it.skip('should show relevant titles according to chronology', () => {
cy.get('[href*="389602841"]')
.parents('[id^="result"]')
.find('.record-number')
.invoke('text')
.then(($num1) => {
const num1 = parseInt($num1)


cy.get('[href*="430480865"]')
.parents('[id^="result"]')
.find('.record-number')
.invoke('text')
.then(($num2) => {
const num2 = parseInt($num2)


expect(num1).to.be.lessThan(num2)
})
})
})


})

Expand Down
6 changes: 4 additions & 2 deletions vufind/searchspecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,13 @@ AllFields:
- [bq, genre_facet:"Rezension"^0.1]
- [bq, genre_facet:"book-review"^0.1]
# Alternative zum abgestufen Boosting des Erscheinungsjahres, eWW
# - [bf=ord(publishDateSort)^500]
# see #35
# see #59
- [bf, 'ord(publishDateSort)^500']
# Hebis inspired
# - [boost, sum(product(max(0,sum(product(abs(ms(NOW/YEAR,publishDateSort)),-5.285e-13),1)),6.5),500)]
# Docs inspired
- [bf=recip(ms(NOW/Year,ord(publishDateSort)),1,1000,1000)]
# - [bf=recip(ms(NOW/Year,ord(publishDateSort)),1,1000,1000)]
# Old Approach
# - [bq, publishDateSort:2023^280]
# - [bq, publishDateSort:2022^260]
Expand Down

0 comments on commit af68a97

Please sign in to comment.