Coder Social home page Coder Social logo

jessica_kibana_docker's Introduction

deploy the docker

pull the docker from docker hub

docker pull gaoyuanliang/jessica_kibana:1.0.6

run the docker

docker run -it ^
-v "C:\Users\gaoyu\Downloads":/Downloads/ ^
-p 0.0.0.0:9466:9466 ^
-p 0.0.0.0:5145:5145 ^
gaoyuanliang/jessica_kibana:1.0.6

enter the docker

docker ps

docker exec -it 0940e37e5242 bash

elasticsearch

start the service

import jessica_es

es_session = jessica_es.start_es(
	es_path = "/jessica/elasticsearch-6.7.1",
	es_port_number = "9466")

check the service at http://localhost:9466

ingest data to es index

ingest one record to index

jessica_es.insert_doc_to_es(
	es_session,
	es_index = 'customers',
	doc_dict = {'CustomerName':'Alfreds Futterkiste',
		'Address':'Obere Str. 57',
		'Age':26},
	doc_id = '1')

ingest a json file of data to an es index

jessica_es.ingest_json_to_es_index(
	json_file = 'data_sample.json',
	es_index = "customers",
	es_session = es_session,
	document_id_feild = 'CustomerName',
	)

view the data of index at http://localhost:9466/customers/_search?pretty=true

view the indeces at Elasticsearch at http://localhost:9466/_cat/indices?v

query from index

for r in jessica_es.search_doc_by_match(
	index_name = 'customers',
	entity_name = 'Alfreds Futterkiste',
	field_name = 'CustomerName',
	es_session = es_session,
	return_entity_max_number = 1,
	return_entity_min_score = 0):
	print(r)

kibana

start kibana

jessica_es.start_kibana(
	kibana_port_number = "5145",
	es_port_number = "9466",
	)

view kibana dashboard at http://localhost:5145

if blocked, run the commend in kibana

PUT .kibana/_settings
{
	"index": {
	"blocks": {
		"read_only_allow_delete": "false"
		}
	}
}

todo list

  1. build api for batch data ingestion from json file or folder -- single json file ingestion complete, folder of json files pending
  2. vector search https://www.elastic.co/guide/en/elasticsearch/reference/master/query-dsl-script-score-query.html - complete

jessica_kibana_docker's People

Contributors

gaoyuanliang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.