Some helpful commands for Kibana using the Dev Tools feature:
GET _all
GET twitter/tweet/_count
GET my_index
#!/bin/bash | |
# update apt-get | |
export DEBIAN_FRONTEND="noninteractive" | |
sudo apt-get update | |
# remove previously installed Docker | |
sudo apt-get remove docker docker-engine docker.io* lxc-docker* | |
# install dependencies 4 cert |
# Sidekiq interaction and startup script | |
commands: | |
create_post_dir: | |
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
mode: "000755" | |
owner: root | |
group: root |
namespace :searchkick do | |
desc "maybe reindex without running out of memory?" | |
task :altindex, [:start_index, :batch_size, :new_index_name] => :environment do |t, args| | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
count = Item.count | |
start = args[:start_index].to_i || 0 | |
batch_size = args[:batch_size].to_i || 1000 | |
# we create a new index or take one already present | |
if args[:new_index_name] |
{ | |
"japanese_template": { | |
"template": "*ja", | |
"settings": { | |
"analysis": { | |
"filter": { | |
"romaji": { | |
"type": "kuromoji_readingform", | |
"use_romaji": true | |
} |