Last active
August 29, 2015 14:00
-
-
Save sgringwe/11384161 to your computer and use it in GitHub Desktop.
Using Elasticsearch and tire gem in rails integration specs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For using elasticsearch in specs. This (hopefully) solves the issue of brittle tests | |
# from elasaticsearch's refresh interval of 1 second. | |
# -1 for instant refresh: | |
# => http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html | |
# 30 merge factor for faster index creation: | |
# => http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-merge.html | |
RestClient.put "#{ENV['ELASTICSEARCH_URL']}/_settings ", %<{ | |
"index" : { | |
"refresh_interval" : "-1", | |
"merge.policy.merge_factor" : 30 | |
} | |
}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment