Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View dadoonet's full-sized avatar
🇪🇺
From Europe with ❤️

David Pilato dadoonet

🇪🇺
From Europe with ❤️
View GitHub Profile
@dadoonet
dadoonet / search_kibana_console.txt
Last active May 8, 2023 21:57
Demo script for "A NoSQL search engine to find..." talk
### REINIT
DELETE user
PUT user
{
"mappings": {
"properties": {
"name": {
"type": "text"
},
"comments": {
{
"meta": { "theme": "elegant" },
"basics": {
"name": "David Pilato",
"label": "Developer | Evangelist",
"image": "https://storage.cloud.google.com/dadoonet-speaker/DevoxxMA-David-Speaker.JPG",
"email": "david@pilato.fr",
"phone": "+33 613030841",
"url": "https://david.pilato.fr",
"summary": "A summary of John Doe…",
@dadoonet
dadoonet / commands.sh
Created February 11, 2022 17:24 — forked from xeraa/commands.sh
Elastic 8.0 security by default: Minimal setup with Docker for a 3 node cluster + Kibana
// Start the first node and keep the generated security credentials handy
docker run -e ES_JAVA_OPTS="-Xms1g -Xmx1g" -p 9200:9200 -it docker.elastic.co/elasticsearch/elasticsearch:8.0.0
// Check if the node has started correctly
curl --insecure --user elastic https://localhost:9200/
// Add your second node
docker run -e ENROLLMENT_TOKEN="..." -e ES_JAVA_OPTS="-Xms1g -Xmx1g" -it docker.elastic.co/elasticsearch/elasticsearch:8.0.0
// Check if it has joined the cluster
@dadoonet
dadoonet / deletebyquery.sh
Created May 15, 2013 19:55
Delete By Query usage
echo "clean index"
curl -XDELETE 'http://localhost:9200/twitter?pretty' ; echo
echo "PUT Tweet"
curl -XPUT 'http://localhost:9200/twitter/tweet/1?ttl=1h&pretty' -d '
{
"created_at": "Mon May 13 19:59:27 +0000 2013"
}
' ; echo
@dadoonet
dadoonet / script.txt
Last active September 1, 2020 16:26
Advanced Search for your Legacy application script
### Step 0 : INIT
DELETE test
DELETE person
### Step 1
GET /
GET _cat/indices/person*?v&h=index,docs.count,store.size
@dadoonet
dadoonet / backup.sh
Created December 26, 2012 14:50
Backup Elasticsearch node
# Script to be placed in elasticsearch/bin
# Launch it from elasticsearch dir
# bin/backup indexname
# We suppose that data are under elasticsearch/data
# It will create a backup file under elasticsearch/backup
if [ -z "$1" ]; then
INDEX_NAME="dummy"
else
INDEX_NAME=$1
@dadoonet
dadoonet / ingest.kibana
Created March 19, 2019 16:25
Ingest Attachment with OCR
PUT _ingest/pipeline/attachment
{
"description" : "Extract attachment information",
"processors" : [
{
"attachment" : {
"field" : "data"
}
},{
"remove": {
@dadoonet
dadoonet / jussieu1.js
Last active December 10, 2018 13:42
Jussieu workshop
DELETE user
PUT user
{
"settings": {
"number_of_shards": 1
},
"mappings": {
"_doc": {
"properties": {
"name": {

Keybase proof

I hereby claim:

  • I am dadoonet on github.
  • I am dadoonet (https://keybase.io/dadoonet) on keybase.
  • I have a public key ASAO0iyeEGc4SdS0o_h57mZ4tzHdCcblMVLnQXDkWQYr8wo

To claim this, I am signing this object:

@dadoonet
dadoonet / fr.sh
Created March 21, 2012 10:27
French analyzer for ES
#!/bin/bash
ES='http://localhost:9200'
ESIDX='test3'
ESTYPE='test'
curl -XDELETE $ES/$ESIDX
curl -XPUT $ES/$ESIDX/ -d '{
"settings" : {