Skip to content

Commit

Permalink
Merge pull request #453 from NYPL/main
Browse files Browse the repository at this point in the history
prod deployment
  • Loading branch information
charmingduchess authored Jan 29, 2025
2 parents 08b46b9 + 78e35b0 commit cb14d2f
Show file tree
Hide file tree
Showing 21 changed files with 75,087 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/production.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NYPL_OAUTH_URL=https://isso.nypl.org/
ENCRYPTED_NYPL_OAUTH_ID=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAGswaQYJKoZIhvcNAQcGoFwwWgIBADBVBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDMLKVUQA58B6vprNcAIBEIAoaz0lI9EL2M9NyTuEwT8JDmPBt6aXfMiFs027DEuwsCN0wS0qWeFL1g==
ENCRYPTED_NYPL_OAUTH_SECRET=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAIcwgYQGCSqGSIb3DQEHBqB3MHUCAQAwcAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyWz91LOP2YP5fg0q0CARCAQ9inO9SV1M8R0Pkkx84r7UdwlU1FxfXvIjk/z6Qs81KBAVELhby2iD5LawQyDrR9tjhuMbotS6QnydwwMR/p8+qJXHI=

NYPL_CORE_VERSION=v2.25
NYPL_CORE_VERSION=v2.26

LOG_LEVEL=info
FEATURES=on-site-edd
Expand Down
2 changes: 1 addition & 1 deletion config/qa.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NYPL_OAUTH_URL=https://isso.nypl.org/
ENCRYPTED_NYPL_OAUTH_ID=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAGswaQYJKoZIhvcNAQcGoFwwWgIBADBVBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDMLKVUQA58B6vprNcAIBEIAoaz0lI9EL2M9NyTuEwT8JDmPBt6aXfMiFs027DEuwsCN0wS0qWeFL1g==
ENCRYPTED_NYPL_OAUTH_SECRET=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAIcwgYQGCSqGSIb3DQEHBqB3MHUCAQAwcAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyWz91LOP2YP5fg0q0CARCAQ9inO9SV1M8R0Pkkx84r7UdwlU1FxfXvIjk/z6Qs81KBAVELhby2iD5LawQyDrR9tjhuMbotS6QnydwwMR/p8+qJXHI=

NYPL_CORE_VERSION=v2.25
NYPL_CORE_VERSION=v2.26

LOG_LEVEL=debug
FEATURES=on-site-edd
Expand Down
4 changes: 2 additions & 2 deletions lib/elasticsearch/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ const SEARCH_SCOPES = {
fields: [
'title^5',
'title.folded^2',
'description.folded',
'description.foldedStemmed',
'subjectLiteral^2',
'subjectLiteral.folded',
'creatorLiteral^2',
'creatorLiteral.folded',
'contributorLiteral.folded',
'note.label.folded',
'note.label.foldedStemmed',
'publisherLiteral.folded',
'seriesStatement.folded',
'titleAlt.folded',
Expand Down
2 changes: 1 addition & 1 deletion lib/elasticsearch/elastic-query-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class ElasticQueryBuilder {
* Require strong match on queried callnumber
**/
requireCallnumberMatch () {
const q = this.request.querySansQuotes()
const q = this.request.querySansQuotes().trim()

this.query.addMust({
bool: {
Expand Down
3 changes: 2 additions & 1 deletion test/elastic-query-builder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ describe('ElasticQueryBuilder', () => {

describe('search_scope callnumber', () => {
it('generates a "callnumber" query', () => {
const request = new ApiRequest({ q: 'toast', search_scope: 'callnumber' })
// including leading and trailing whitespace to validate that query is trimmed
const request = new ApiRequest({ q: ' toast ', search_scope: 'callnumber' })
const inst = ElasticQueryBuilder.forApiRequest(request)

// Expect multiple term/prefix matches on identifier fields:
Expand Down
18 changes: 18 additions & 0 deletions test/fixtures/query-172660cdf69c5a68bad95e74a2867a9d.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"took": 27,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 0,
"relation": "eq"
},
"max_score": null,
"hits": []
}
}
Loading

0 comments on commit cb14d2f

Please sign in to comment.