This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/analysis/kuromoji (fix-4056 *$) $ ant clean | |
Buildfile: /Users/johtani/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/analysis/kuromoji/build.xml | |
clean: | |
[delete] Deleting directory /Users/johtani/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/build/analysis/kuromoji | |
BUILD SUCCESSFUL | |
Total time: 0 seconds | |
~/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/analysis/kuromoji (fix-4056 *$) $ ant build-dict | |
Buildfile: /Users/johtani/IdeaProjects/lucene-gosen-workspace/lucene-solr/lucene/analysis/kuromoji/build.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT _template/hoge | |
{ | |
"index_patterns": ["hoge-*"], | |
"settings": { | |
"number_of_replicas": 0, | |
"number_of_shards": 2 | |
}, | |
"mappings": { | |
"type1": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST _reindex | |
{ | |
"source": { | |
"index": "apache_elk_example_org" | |
}, | |
"dest": { | |
"index": "apache_elk_example" | |
}, | |
"script": { | |
"inline": "Random rdm = new Random();ctx._source['@timestamp'] = params.dates[rdm.nextInt(params.dates.length)]+ ctx._source['@timestamp'].substring(10);", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String json = "{" + | |
"\"user\":\"kimchy\"\n," + | |
"\"postDate\":\"2013-01-30\"," + | |
"\"message\":\"trying out Elasticsearch\"" + | |
"}"; | |
BulkRequestBuilder bulkRequest = client.prepareBulk(); | |
bulkRequest.add(client.prepareIndex("test1", "tweet", "id1").setSource(json)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT hoge_index | |
{ | |
"settings": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0 | |
}, | |
"mappings": { | |
"hoge": { | |
"properties": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE /filtered_aggs | |
PUT /filtered_aggs | |
PUT /filtered_aggs/example/1 | |
{ | |
"text" : "this is test doc" | |
} | |
PUT /filtered_aggs/example/2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE kuromoji_sample | |
PUT kuromoji_sample | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"hoge" : { | |
"type" : "custom", | |
"tokenizer" : "kuromoji_tokenizer", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET sensu-metrics-2014.10.31/_search | |
{ | |
"facets": { | |
"0": { | |
"date_histogram": { | |
"key_field": "@timestamp", | |
"value_field": "value", | |
"interval": "1m" | |
}, | |
"global": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -XPUT localhost:9200/test_idx -d @config.json | |
{"error":"MapperParsingException[mapping [test_type]]; nested: IllegalArgumentException[Invalid format: [not_analyze]: Illegal pattern component: n]; nested: IllegalArgumentException[Illegal pattern component: n]; ","status":400}jupiter:ess_env |