No need to override the typoTolerance settings, it's already the default

value
This commit is contained in:
Sylvain UTARD 2015-07-07 15:31:03 +02:00
parent 67b8912628
commit 0c748984f7
2 changed files with 1 additions and 3 deletions

View File

@ -130,7 +130,6 @@ class AlgoliaSearchJekyllPush < Jekyll::Command
# Get index settings # Get index settings
def configure_index(index) def configure_index(index)
settings = { settings = {
typoTolerance: true,
distinct: true, distinct: true,
attributeForDistinct: 'title', attributeForDistinct: 'title',
attributesForFaceting: %w(tags type title), attributesForFaceting: %w(tags type title),

View File

@ -181,8 +181,7 @@ describe(AlgoliaSearchJekyllPush) do
expected = { expected = {
attributeForDistinct: 'title', attributeForDistinct: 'title',
distinct: true, distinct: true,
customRanking: ['desc(posted_at)', 'desc(title_weight)'], customRanking: ['desc(posted_at)', 'desc(title_weight)']
typoTolerance: true
} }
expect(index).to receive(:set_settings).with(hash_including(expected)) expect(index).to receive(:set_settings).with(hash_including(expected))