Skip to content

Commit a71b463

Browse files
committed
Revert "Merge pull request #1698 from libris/feature/lws-424-improve-spelling-suggestions"
This reverts commit e8c8b8f, reversing changes made to 4dda2ba.
1 parent e8c8b8f commit a71b463

2 files changed

Lines changed: 11 additions & 29 deletions

File tree

librisxl-tools/elasticsearch/libris_config.json

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@
265265
"keyword": {
266266
"type": "keyword",
267267
"normalizer": "custom_case_insensitive"
268+
},
269+
"trigram": {
270+
"type": "text",
271+
"analyzer": "trigram"
272+
},
273+
"reverse": {
274+
"type": "text",
275+
"analyzer": "reverse"
268276
}
269277
}
270278
},
@@ -475,35 +483,9 @@
475483
}
476484
}
477485
},
478-
{
479-
"chipStr-spell-and-ignore-length_template": {
480-
"match": "_chipStr",
481-
"mapping": {
482-
"fields": {
483-
"exact": {
484-
"type": "text",
485-
"analyzer": "standard",
486-
"similarity": "bm25-only-idf-ignore-tf"
487-
},
488-
"trigram": {
489-
"type": "text",
490-
"analyzer": "trigram"
491-
},
492-
"reverse": {
493-
"type": "text",
494-
"analyzer": "reverse"
495-
}
496-
},
497-
"analyzer": "softmatcher",
498-
"similarity": "bm25-only-idf-ignore-tf",
499-
"type": "text",
500-
"index": true
501-
}
502-
}
503-
},
504486
{
505487
"str-ignore-length_template": {
506-
"match": ["_cardStr", "_searchCardStr"],
488+
"match": ["_chipStr", "_cardStr", "_searchCardStr"],
507489
"mapping": {
508490
"fields": {
509491
"exact": {

whelk-core/src/main/groovy/whelk/search/ESQuery.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class ESQuery {
4949
private static final String FILTERED_AGG_NAME = 'a'
5050
private static final String NESTED_AGG_NAME = 'n'
5151

52-
private static final String SPELL_CHECK_FIELD = '_chipStr.trigram'
53-
private static final String SPELL_CHECK_FIELD_REVERSE = '_chipStr.reverse'
52+
private static final String SPELL_CHECK_FIELD = '_sortKeyByLang.sv.trigram'
53+
private static final String SPELL_CHECK_FIELD_REVERSE = '_sortKeyByLang.sv.reverse'
5454

5555
private static final Map recordsOverCacheRecordsBoost = [
5656
'bool': ['should': [

0 commit comments

Comments
 (0)