in some_viwe_file.html.haml
.home-services
%a{"data-toggle-selector" => "#me", :href => "#"}
some link name
#me{class: "cont"}
%p
Some text
module LibraryApplicationElasticsearchSearchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
http://hadooptutorial.info/apache-flume-installation/
###Step 1 :
Загружаем bin
файл флюма http://flume.apache.org/download.html
###Step 2 :
поочередно выполняем нижеприведенные строки кода:
$ sudo mkdir /usr/lib/flume
$ sudo chmod -R 777 /usr/lib/flume
#Kafka for Ruby http://teamcoding.com/blog/2015/10/05/kafka/
Kafka is “publish-subscribe messaging rethought as a distributed commit log”.
We are exploring Kafka for doing something which looks like Event Sourcing from Domain Driven Design.
Kafka’s performance is pretty much constant with respect to data size so retaining events forever should not present a problem.
#Install Kafka
#Задача - показать количество продуктов в списке категорий ##Controllers
nodes_controller.rb
def index
@items = Node.includes(:cluster => [:team]).by_filter(@filter)
# for count
node_ids = Node.pluck(:id)
VSE PO PORYADKU
(from: http://itc-life.ru/fluentd-bystryj-poisk-logov-s-elasticsearch-kibana-and-fluentd/
)
$ `sudo wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.1/elasticsearch-2.3.1.deb`
$ `sudo dpkg -i elasticsearch-2.3.1.deb`
#Install kibana ##Development Environment https://www.elastic.co/guide/en/kibana/current/setup.html
To get Kibana up and running:
Для того, чтобы kibana
увидела index_name
из elasticsearch
нужно сделать mappings dynamic: 'true'
и поставить :type => 'date'
для :created_at
#Custom layout ##Controller
../app/controllers/search_controller.rb
class SearchController < ApplicationController
layout "blank"
def index