Skip to content

Instantly share code, notes, and snippets.

space_user:
  run_as: [ '*' ]
  cluster: [ 'all' ]
  indices:
    - names: [ '*' ]
      privileges: [ 'read' ]
  applications: ['kibana-.kibana']
      privileges: ['space_all']
 resources:
@TomonoriSoejima
TomonoriSoejima / alex_test.md
Last active November 6, 2020 12:25
alex test
PUT test/_doc/1
{
  "message" : "Port XX/XX flood control mc stop action"
}

PUT test/_doc/2
{
  "message" : "Port XX/XX flood control mc start action"
}

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
{"hostname":"soejima", "cards" : [{"id" : "1", "ifDescr" : "eth1" }, {"id" : "2" , "ifDescr" : "eth2"}, {"id" : "3", "ifDescr" : "eth3"}]}
@TomonoriSoejima
TomonoriSoejima / buckets_path_test.md
Last active November 6, 2020 12:25
buckets_path test
POST a/3
{"uid": 0, "value": 1} 
POST a/3
{"uid": 1, "value": 1} 
POST a/3
{"uid": 1, "value": 1} 
POST a/3
{"uid": 2, "value": 10} 
POST a/3
@TomonoriSoejima
TomonoriSoejima / look_for_escape_character.md
Last active November 6, 2020 12:25
look for escape character
DELETE test4

PUT /test4
{
  "mappings": {
    "test": {
      "properties": {
        "name": {
 "type": "text",
@TomonoriSoejima
TomonoriSoejima / time_format_test.md
Last active November 6, 2020 12:24
time format test
DELETE a2

PUT a2
{
  "mappings": {
    "a": {
      "properties": {
        "created": {
 "type": "date"
delete t
PUT /t
{
  "settings": {
    "index": {
      "analysis": {
        "filter": {
          "engram": {
            "type": "edgeNGram",
@TomonoriSoejima
TomonoriSoejima / cloud_dictionary_upload_sample.md
Last active November 6, 2020 12:24
cloud dictionary upload sample
# note that elasticsearch/config/test.txt should exist

PUT /test
{
  "settings": {
    "analysis": {
      "filter": {
        "my_synonym_filter": {
          "type": "synonym", 
@TomonoriSoejima
TomonoriSoejima / multi_match.md
Last active November 6, 2020 07:32
multiple search sample
GET /hotel/_search
{
  "query": {
    "multi_match" : {
      "query":      "tofu ramen Yakitori",
      "type":       "best_fields",
      "fields":     [ "dinner_menu", "lunch_menu" ],
      "tie_breaker": 0.3,
 "operator": "and"