Skip to content

Commit

Permalink
feat(relevance): add some synonyms (#192)
Browse files Browse the repository at this point in the history
This will allow obscure names like i18n an a11y show up, even if a user didn't _exactly_ type them.

To be checked on a replica in advance of merging
  • Loading branch information
Haroenv committed May 1, 2019
1 parent 5527533 commit 760f34a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/__tests__/__snapshots__/config.test.js.snap
Expand Up @@ -146,6 +146,34 @@ Object {
],
"type": "synonym",
},
Object {
"objectID": "a11y",
"synonyms": Array [
"a11y",
"accessibility",
"accessible",
],
"type": "synonym",
},
Object {
"objectID": "i18n",
"synonyms": Array [
"i18n",
"internationalisation",
"internationalization",
"translation",
"translate",
],
"type": "synonym",
},
Object {
"objectID": "k8s",
"synonyms": Array [
"k8s",
"kubernetes",
],
"type": "synonym",
},
],
"jsDelivrHitsEndpoint": "https://data.jsdelivr.com/v1/stats/packages/month/all",
"maxObjSize": 450000,
Expand Down
21 changes: 21 additions & 0 deletions src/config.js
Expand Up @@ -63,6 +63,27 @@ const defaultConfig = {
synonyms: ['_', 'underscore'],
objectID: 'underscore',
},
{
type: 'synonym',
synonyms: ['a11y', 'accessibility', 'accessible'],
objectID: 'a11y',
},
{
type: 'synonym',
synonyms: [
'i18n',
'internationalisation',
'internationalization',
'translation',
'translate',
],
objectID: 'i18n',
},
{
type: 'synonym',
synonyms: ['k8s', 'kubernetes'],
objectID: 'k8s',
},
],
indexRules: [
{
Expand Down

0 comments on commit 760f34a

Please sign in to comment.