FIX: revert diacritic stripping

See more details in test case and at: https://meta.discourse.org/t/discourse-should-ignore-if-a-character-is-accented-when-doing-a-search/90198/16?u=sam
This commit is contained in:
Sam
2018-08-31 11:46:55 +10:00
parent 81b99efc68
commit 9b7cab589a
4 changed files with 15 additions and 9 deletions

View File

@@ -1006,11 +1006,15 @@ describe Search do
results = Search.execute('hello', type_filter: 'topic')
expect(results.posts.length).to eq(1)
# TODO when we add diacritic support we should return 1 here
results = Search.execute('regis', type_filter: 'topic')
expect(results.posts.length).to eq(0)
results = Search.execute('Régis', type_filter: 'topic', include_blurbs: true)
expect(results.posts.length).to eq(1)
results = Search.execute('Régis', type_filter: 'topic')
expect(results.posts.length).to eq(1)
# this is a test we got to keep working
expect(results.blurb(results.posts.first)).to include('Régis')
results = Search.execute('สวัสดี', type_filter: 'topic')
expect(results.posts.length).to eq(1)