Last active
August 29, 2015 14:26
-
-
Save shaharmor/b51a9297337133efab5f to your computer and use it in GitHub Desktop.
Revisions
-
shaharmor revised this gist
Aug 11, 2015 . No changes.There are no files selected for viewing
-
shaharmor revised this gist
Aug 11, 2015 . 1 changed file with 17 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ YEAR_START=2015 YEAR_END=2015 MONTH_START=1 MONTH_END=12 DAY_START=1 DAY_END=31 for year in $(seq -f "%04g" $YEAR_START $YEAR_END) do for month in $(seq -f "%02g" $MONTH_START $MONTH_END) do for day in $(seq -f "%02g" $DAY_START $DAY_END) do echo "$year.$month.$day" done done done -
shaharmor revised this gist
Aug 11, 2015 . 5 changed files with 7 additions and 35 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ curl -XPUT localhost:9200/logstash-YYYY.MM.DD/_settings -d '{ "index.cache.query.enable": true }' This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ curl -XPOST "localhost:9200/logstash-YYYY.MM.DD/_optimize?max_num_segments=1" This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,19 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ # beofre using this script you must install the reindex module from https://github.com/codelibs/elasticsearch-reindexing # using $ES_HOME/bin/plugin --install org.codelibs/elasticsearch-reindexing/1.7.0 curl -XPOST "localhost:9200/logstash-YYYY.MM.DD/_reindex/logstash-YYYY.MM.DD-old/?wait_for_completion=true" curl -XDELETE "localhost:9200/logstash-YYYY.MM.DD/" -
shaharmor revised this gist
Jul 30, 2015 . 2 changed files with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,13 +6,13 @@ do echo "Reindexing logstash-2015.03.$i to logstash-2015.03.$i-old" curl -XPOST "localhost:9200/logstash-2015.03.$i/_reindex/logstash-2015.03.$i-old/?wait_for_completion=true" echo -e "\nDeleting logstash-2015.03.$i" curl -XDELETE "localhost:9200/logstash-2015.03.$i/" echo -e "\nReindexing logstash-2015.03.$i-old to logstash-2015.03.$i" curl -XPOST "localhost:9200/logstash-2015.03.$i-old/_reindex/logstash-2015.03.$i/?wait_for_completion=true" echo -e "\nDeleting logstash-2015.03.$i-old" curl -XDELETE "localhost:9200/logstash-2015.03.$i-old/" echo "Finished reindexing logstash-2015.03.$i" This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,13 +4,13 @@ echo "Reindexing logstash-2015.03.$i to logstash-2015.03.$i-old" curl -XPOST "localhost:9200/logstash-2015.03.$i/_reindex/logstash-2015.03.$i-old/?wait_for_completion=true" echo -e "\nDeleting logstash-2015.03.$i" curl -XDELETE "localhost:9200/logstash-2015.03.$i/" echo -e "\nReindexing logstash-2015.03.$i-old to logstash-2015.03.$i" curl -XPOST "localhost:9200/logstash-2015.03.$i-old/_reindex/logstash-2015.03.$i/?wait_for_completion=true" echo -e "\nDeleting logstash-2015.03.$i-old" curl -XDELETE "localhost:9200/logstash-2015.03.$i-old/" echo "Finished reindexing logstash-2015.03.$i" -
shaharmor revised this gist
Jul 30, 2015 . 2 changed files with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,5 +12,8 @@ do echo "Reindexing logstash-2015.03.$i-old to logstash-2015.03.$i" curl -XPOST "localhost:9200/logstash-2015.03.$i-old/_reindex/logstash-2015.03.$i/?wait_for_completion=true" echo "Deleting logstash-2015.03.$i-old" curl -XDELETE "localhost:9200/logstash-2015.03.$i-old/" echo "Finished reindexing logstash-2015.03.$i" done This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,7 @@ curl -XDELETE "localhost:9200/logstash-2015.03.$i/" echo "Reindexing logstash-2015.03.$i-old to logstash-2015.03.$i" curl -XPOST "localhost:9200/logstash-2015.03.$i-old/_reindex/logstash-2015.03.$i/?wait_for_completion=true" echo "Deleting logstash-2015.03.$i-old" curl -XDELETE "localhost:9200/logstash-2015.03.$i-old/" echo "Finished reindexing logstash-2015.03.$i" -
shaharmor revised this gist
Jul 30, 2015 . No changes.There are no files selected for viewing
-
shaharmor revised this gist
Jul 30, 2015 . No changes.There are no files selected for viewing
-
shaharmor revised this gist
Jul 30, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ # beofre using this script you must install the reindex module from https://github.com/codelibs/elasticsearch-reindexing # using $ES_HOME/bin/plugin --install org.codelibs/elasticsearch-reindexing/1.7.0 for i in $(seq -f "%02g" 1 31) do echo "Reindexing logstash-2015.03.$i to logstash-2015.03.$i-old" -
shaharmor created this gist
Jul 30, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ for i in $(seq -f "%02g" 1 31) do echo "Reindexing logstash-2015.03.$i to logstash-2015.03.$i-old" curl -XPOST "localhost:9200/logstash-2015.03.$i/_reindex/logstash-2015.03.$i-old/?wait_for_completion=true" echo "Deleting logstash-2015.03.$i" curl -XDELETE "localhost:9200/logstash-2015.03.$i/" echo "Reindexing logstash-2015.03.$i-old to logstash-2015.03.$i" curl -XPOST "localhost:9200/logstash-2015.03.$i-old/_reindex/logstash-2015.03.$i/?wait_for_completion=true" echo "Finished reindexing logstash-2015.03.$i" done This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ # beofre using this script you must install the reindex module from https://github.com/codelibs/elasticsearch-reindexing # using $ES_HOME/bin/plugin --install org.codelibs/elasticsearch-reindexing/1.7.0 echo "Reindexing logstash-2015.03.$i to logstash-2015.03.$i-old" curl -XPOST "localhost:9200/logstash-2015.03.$i/_reindex/logstash-2015.03.$i-old/?wait_for_completion=true" echo "Deleting logstash-2015.03.$i" curl -XDELETE "localhost:9200/logstash-2015.03.$i/" echo "Reindexing logstash-2015.03.$i-old to logstash-2015.03.$i" curl -XPOST "localhost:9200/logstash-2015.03.$i-old/_reindex/logstash-2015.03.$i/?wait_for_completion=true" echo "Finished reindexing logstash-2015.03.$i"