Skip to content

Instantly share code, notes, and snippets.

@gaffo
Created September 29, 2011 21:02
Show Gist options
  • Save gaffo/1251943 to your computer and use it in GitHub Desktop.
Save gaffo/1251943 to your computer and use it in GitHub Desktop.
{
"docs":{
"properties" : {
"contents" : {
"type" : "attachment",
"fields" : {
"content" : {"store": "no"}
}
},
"lastModified": { "type" : "long", "index" : "analyzed", "store" : "no"}
}
}
}
package com.suckerpunch.desktopsearch;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.tika.mime.MimeTypes;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.action.index.IndexRequestBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.node.Node;
public class IndexerMain {
private static List<String> extensions;
private static List<String> unknownExtensions = new ArrayList<String>();
private static Client client;
public static void main(String[] args) throws IOException {
Node node = nodeBuilder().client(true).node();
client = node.client();
extensions = Arrays.asList(
"xml", "script");
File basedir = new File("c:/art");
long startTime = System.currentTimeMillis();
recurseAndIndex(basedir);
Collections.sort(unknownExtensions);
System.out.println("Indexing took: "
+ (System.currentTimeMillis() - startTime) / 1000.0
+ " Seconds");
System.out.println("Unknown Extensions: " + unknownExtensions);
}
private static void recurseAndIndex(File basedir) {
for (final File file : basedir.listFiles()) {
if (!file.isDirectory()){
String extension = FilenameUtils.getExtension(file.getName());
if (extensions.contains(extension)){
System.out.println(file.getAbsolutePath());
try {
XContentBuilder objectBuilder = jsonBuilder().startObject();
objectBuilder.startObject(Index.CONTENTS);
if (extension.equals("xml")){
objectBuilder.field("_content_type", MimeTypes.XML);
}
else {
objectBuilder.field("_content_type", MimeTypes.PLAIN_TEXT);
}
objectBuilder.field("_name", file.getName());
objectBuilder.field("content", Base64.encodeBase64(FileUtils.readFileToString(file).getBytes()));
objectBuilder.endObject();
objectBuilder.field(Index.LAST_MODIFIED, file.lastModified());
objectBuilder.endObject();
IndexRequestBuilder setSource = client.prepareIndex(Index.INDEX, Index.TYPE, file.getAbsolutePath()).setSource(objectBuilder);
setSource.execute().actionGet();
} catch (Exception e) {
e.printStackTrace();
}
}
else{
if (!unknownExtensions.contains(extension)){
unknownExtensions.add(extension);
}
}
}
else{
recurseAndIndex(file);
}
}
}
}
20110929-14:22:17 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [create-index [docs], cause [api]]: execute
20110929-14:22:17 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices - [Xi'an Chi Xan] creating Index [docs], shards [5]/[1]
20110929-14:22:17 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.mapper - [Xi'an Chi Xan] [docs] using dynamic[true], default mapping: location[null] and source[{
"_default_" : {
}
}]
20110929-14:22:17 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.cache.field.data.resident - [Xi'an Chi Xan] [docs] using [resident] field cache with max_size [-1], expire [null]
20110929-14:22:17 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.cache - [Xi'an Chi Xan] [docs] Using stats.refresh_interval [1s]
20110929-14:22:17 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Index[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:17 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@7ef72e77 under org.elasticsearch:service=indices,index=docs
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] INFO org.elasticsearch.cluster.metadata - [Xi'an Chi Xan] [docs] creating index, cause [api], shards [5]/[1], mappings [doc]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.cluster.service - [Xi'an Chi Xan] cluster state updated:
version [2], source [create-index [docs], cause [api]]
nodes:
[Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]], local, master
routing_table:
-- index [docs]
----shard_id [docs][0]
--------[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][0], node[null], [R], s[UNASSIGNED]
----shard_id [docs][1]
--------[docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][1], node[null], [R], s[UNASSIGNED]
----shard_id [docs][2]
--------[docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][2], node[null], [R], s[UNASSIGNED]
----shard_id [docs][3]
--------[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][3], node[null], [R], s[UNASSIGNED]
----shard_id [docs][4]
--------[docs][4], node[null], [P], s[UNASSIGNED]
--------[docs][4], node[null], [R], s[UNASSIGNED]
routing_nodes:
-----node_id[BpAQ0ifGScyV8XuVaGgLAw]
--------[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
---- unassigned
--------[docs][0], node[null], [R], s[UNASSIGNED]
--------[docs][1], node[null], [R], s[UNASSIGNED]
--------[docs][2], node[null], [R], s[UNASSIGNED]
--------[docs][3], node[null], [R], s[UNASSIGNED]
--------[docs][4], node[null], [P], s[UNASSIGNED]
--------[docs][4], node[null], [R], s[UNASSIGNED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]riverClusterService#updateTask-pool-10-thread-1] DEBUG org.elasticsearch.river.cluster - [Xi'an Chi Xan] processing [reroute_rivers_node_changed]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]riverClusterService#updateTask-pool-10-thread-1] DEBUG org.elasticsearch.river.cluster - [Xi'an Chi Xan] processing [reroute_rivers_node_changed]: no change in cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.cluster - [Xi'an Chi Xan] [docs][0] creating shard
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.service - [Xi'an Chi Xan] [docs] creating shard_id [0]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.store.fs - [Xi'an Chi Xan] [docs][0] using [mmap_fs] store with path [D:\java-workspace\com.suckerpunch.desktopsearch\data\elasticsearch\nodes\0\indices\docs\0\index]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.deletionpolicy - [Xi'an Chi Xan] [docs][0] Using [keep_only_last] deletion policy
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.policy - [Xi'an Chi Xan] [docs][0] using [tiered] merge policy with expunge_deletes_allowed[10.0], floor_segment[2mb], max_merge_at_once[10], max_merge_at_once_explicit[30], max_merged_segment[5gb], segments_per_tier[10.0], reclaim_deletes_weight[2.0], async_merge[true]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.scheduler - [Xi'an Chi Xan] [docs][0] using [concurrent] merge scheduler with max_thread_count[2]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][0] state: [CREATED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute MaxDoc[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute NumDocs[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogId[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogNumberOfOperations[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Index[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute State[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute RoutingState[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Primary[r=true,w=false,is=true,type=boolean]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute ShardId[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute StoreSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@5952e9a8 under org.elasticsearch:service=indices,index=docs,subService=shards,shard=0
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute SizeInBytes[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Size[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@3e2de41d under org.elasticsearch:service=indices,index=docs,subService=shards,shard=0,shardType=store
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.translog - [Xi'an Chi Xan] [docs][0] interval [5s], flush_threshold_ops [5000], flush_threshold_size [200mb], flush_threshold_period [30m]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][0] state: [CREATED]->[RECOVERING], reason [from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.cluster - [Xi'an Chi Xan] [docs][1] creating shard
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.service - [Xi'an Chi Xan] [docs] creating shard_id [1]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][0] starting recovery from local ...
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] DEBUG org.elasticsearch.index.engine.robin - [Xi'an Chi Xan] [docs][0] Starting engine
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.store.fs - [Xi'an Chi Xan] [docs][1] using [mmap_fs] store with path [D:\java-workspace\com.suckerpunch.desktopsearch\data\elasticsearch\nodes\0\indices\docs\1\index]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.deletionpolicy - [Xi'an Chi Xan] [docs][1] Using [keep_only_last] deletion policy
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.policy - [Xi'an Chi Xan] [docs][1] using [tiered] merge policy with expunge_deletes_allowed[10.0], floor_segment[2mb], max_merge_at_once[10], max_merge_at_once_explicit[30], max_merged_segment[5gb], segments_per_tier[10.0], reclaim_deletes_weight[2.0], async_merge[true]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.scheduler - [Xi'an Chi Xan] [docs][1] using [concurrent] merge scheduler with max_thread_count[2]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][1] state: [CREATED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute MaxDoc[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute NumDocs[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogId[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogNumberOfOperations[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Index[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute State[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute RoutingState[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Primary[r=true,w=false,is=true,type=boolean]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute ShardId[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute StoreSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@3485def8 under org.elasticsearch:service=indices,index=docs,subService=shards,shard=1
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute SizeInBytes[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Size[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@51d92803 under org.elasticsearch:service=indices,index=docs,subService=shards,shard=1,shardType=store
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.translog - [Xi'an Chi Xan] [docs][1] interval [5s], flush_threshold_ops [5000], flush_threshold_size [200mb], flush_threshold_period [30m]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.memory - [Xi'an Chi Xan] recalculating shard indexing buffer (reason=created_shard[docs][1]), total is [273mb] with [1] active shards, each shard set to [273mb]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][1] state: [CREATED]->[RECOVERING], reason [from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.cluster - [Xi'an Chi Xan] [docs][2] creating shard
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][1] starting recovery from local ...
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.service - [Xi'an Chi Xan] [docs] creating shard_id [2]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][0] scheduling refresher every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.engine.robin - [Xi'an Chi Xan] [docs][1] Starting engine
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][0] scheduling optimizer / merger every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][0] state: [RECOVERING]->[STARTED], reason [post recovery from gateway, no translog]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] TRACE org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][0] refresh with waitForOperations[false]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][0] recovery completed from local, took [74ms]
index : files [0] with total_size [0b], took[5ms]
: recovered_files [0] with total_size [0b]
: reusing_files [0] with total_size [0b]
translog : number_of_operations [0], took [74ms]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] sending shard started for [docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-1] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] received shard started for [docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][1] scheduling refresher every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][1] scheduling optimizer / merger every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][1] state: [RECOVERING]->[STARTED], reason [post recovery from gateway, no translog]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] TRACE org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][1] refresh with waitForOperations[false]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][1] recovery completed from local, took [5ms]
index : files [0] with total_size [0b], took[0s]
: recovered_files [0] with total_size [0b]
: reusing_files [0] with total_size [0b]
translog : number_of_operations [0], took [5ms]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] sending shard started for [docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] received shard started for [docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.store.fs - [Xi'an Chi Xan] [docs][2] using [mmap_fs] store with path [D:\java-workspace\com.suckerpunch.desktopsearch\data\elasticsearch\nodes\0\indices\docs\2\index]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.deletionpolicy - [Xi'an Chi Xan] [docs][2] Using [keep_only_last] deletion policy
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.policy - [Xi'an Chi Xan] [docs][2] using [tiered] merge policy with expunge_deletes_allowed[10.0], floor_segment[2mb], max_merge_at_once[10], max_merge_at_once_explicit[30], max_merged_segment[5gb], segments_per_tier[10.0], reclaim_deletes_weight[2.0], async_merge[true]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.scheduler - [Xi'an Chi Xan] [docs][2] using [concurrent] merge scheduler with max_thread_count[2]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][2] state: [CREATED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute MaxDoc[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute NumDocs[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogId[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogNumberOfOperations[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Index[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute State[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute RoutingState[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Primary[r=true,w=false,is=true,type=boolean]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute ShardId[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute StoreSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@2e4e76b4 under org.elasticsearch:service=indices,index=docs,subService=shards,shard=2
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute SizeInBytes[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Size[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@5f51d6cb under org.elasticsearch:service=indices,index=docs,subService=shards,shard=2,shardType=store
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.translog - [Xi'an Chi Xan] [docs][2] interval [5s], flush_threshold_ops [5000], flush_threshold_size [200mb], flush_threshold_period [30m]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.memory - [Xi'an Chi Xan] recalculating shard indexing buffer (reason=created_shard[docs][2]), total is [273mb] with [2] active shards, each shard set to [136.5mb]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][2] state: [CREATED]->[RECOVERING], reason [from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.cluster - [Xi'an Chi Xan] [docs][3] creating shard
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][2] starting recovery from local ...
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.service - [Xi'an Chi Xan] [docs] creating shard_id [3]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.engine.robin - [Xi'an Chi Xan] [docs][2] Starting engine
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][2] scheduling refresher every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][2] scheduling optimizer / merger every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][2] state: [RECOVERING]->[STARTED], reason [post recovery from gateway, no translog]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] TRACE org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][2] refresh with waitForOperations[false]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][2] recovery completed from local, took [4ms]
index : files [0] with total_size [0b], took[0s]
: recovered_files [0] with total_size [0b]
: reusing_files [0] with total_size [0b]
translog : number_of_operations [0], took [4ms]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] sending shard started for [docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] received shard started for [docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.store.fs - [Xi'an Chi Xan] [docs][3] using [mmap_fs] store with path [D:\java-workspace\com.suckerpunch.desktopsearch\data\elasticsearch\nodes\0\indices\docs\3\index]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.deletionpolicy - [Xi'an Chi Xan] [docs][3] Using [keep_only_last] deletion policy
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.policy - [Xi'an Chi Xan] [docs][3] using [tiered] merge policy with expunge_deletes_allowed[10.0], floor_segment[2mb], max_merge_at_once[10], max_merge_at_once_explicit[30], max_merged_segment[5gb], segments_per_tier[10.0], reclaim_deletes_weight[2.0], async_merge[true]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.scheduler - [Xi'an Chi Xan] [docs][3] using [concurrent] merge scheduler with max_thread_count[2]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][3] state: [CREATED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute MaxDoc[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute NumDocs[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogId[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogNumberOfOperations[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Index[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute State[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute RoutingState[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Primary[r=true,w=false,is=true,type=boolean]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute ShardId[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute StoreSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@a0834e7 under org.elasticsearch:service=indices,index=docs,subService=shards,shard=3
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute SizeInBytes[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Size[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@7821f46a under org.elasticsearch:service=indices,index=docs,subService=shards,shard=3,shardType=store
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.translog - [Xi'an Chi Xan] [docs][3] interval [5s], flush_threshold_ops [5000], flush_threshold_size [200mb], flush_threshold_period [30m]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.memory - [Xi'an Chi Xan] recalculating shard indexing buffer (reason=created_shard[docs][3]), total is [273mb] with [3] active shards, each shard set to [91mb]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][3] state: [CREATED]->[RECOVERING], reason [from gateway]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][3] starting recovery from local ...
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.engine.robin - [Xi'an Chi Xan] [docs][3] Starting engine
... added
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [create-index [docs], cause [api]]: done applying updated cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] applying started shards [[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], [docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], [docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.gateway.local - [Xi'an Chi Xan] [docs][4], node[null], [P], s[UNASSIGNED]: checking node [[Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]]]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][3] scheduling refresher every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][3] scheduling optimizer / merger every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][3] state: [RECOVERING]->[STARTED], reason [post recovery from gateway, no translog]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] TRACE org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][3] refresh with waitForOperations[false]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][3] recovery completed from local, took [4ms]
index : files [0] with total_size [0b], took[0s]
: recovered_files [0] with total_size [0b]
: reusing_files [0] with total_size [0b]
translog : number_of_operations [0], took [4ms]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] sending shard started for [docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] received shard started for [docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.cluster.service - [Xi'an Chi Xan] cluster state updated:
version [3], source [shard-started ([docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]
nodes:
[Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]], local, master
routing_table:
-- index [docs]
----shard_id [docs][0]
--------[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][0], node[null], [R], s[UNASSIGNED]
----shard_id [docs][1]
--------[docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][1], node[null], [R], s[UNASSIGNED]
----shard_id [docs][2]
--------[docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][2], node[null], [R], s[UNASSIGNED]
----shard_id [docs][3]
--------[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][3], node[null], [R], s[UNASSIGNED]
----shard_id [docs][4]
--------[docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][4], node[null], [R], s[UNASSIGNED]
routing_nodes:
-----node_id[BpAQ0ifGScyV8XuVaGgLAw]
--------[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
---- unassigned
--------[docs][0], node[null], [R], s[UNASSIGNED]
--------[docs][1], node[null], [R], s[UNASSIGNED]
--------[docs][2], node[null], [R], s[UNASSIGNED]
--------[docs][3], node[null], [R], s[UNASSIGNED]
--------[docs][4], node[null], [R], s[UNASSIGNED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]riverClusterService#updateTask-pool-10-thread-1] DEBUG org.elasticsearch.river.cluster - [Xi'an Chi Xan] processing [reroute_rivers_node_changed]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]riverClusterService#updateTask-pool-10-thread-1] DEBUG org.elasticsearch.river.cluster - [Xi'an Chi Xan] processing [reroute_rivers_node_changed]: no change in cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.indices.cluster - [Xi'an Chi Xan] [{}][{}] master [{}] marked shard as initializing, but shard already created, mark shard as started
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] sending shard started for [docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [master [Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]] marked shard as initializing, but shard already started, mark shard as started]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] received shard started for [docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [master [Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]] marked shard as initializing, but shard already started, mark shard as started]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.cluster - [Xi'an Chi Xan] [docs][4] creating shard
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.service - [Xi'an Chi Xan] [docs] creating shard_id [4]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.store.fs - [Xi'an Chi Xan] [docs][4] using [mmap_fs] store with path [D:\java-workspace\com.suckerpunch.desktopsearch\data\elasticsearch\nodes\0\indices\docs\4\index]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.deletionpolicy - [Xi'an Chi Xan] [docs][4] Using [keep_only_last] deletion policy
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.policy - [Xi'an Chi Xan] [docs][4] using [tiered] merge policy with expunge_deletes_allowed[10.0], floor_segment[2mb], max_merge_at_once[10], max_merge_at_once_explicit[30], max_merged_segment[5gb], segments_per_tier[10.0], reclaim_deletes_weight[2.0], async_merge[true]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.merge.scheduler - [Xi'an Chi Xan] [docs][4] using [concurrent] merge scheduler with max_thread_count[2]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][4] state: [CREATED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute MaxDoc[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute NumDocs[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogId[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogNumberOfOperations[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Index[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute State[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute RoutingState[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute TranslogSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Primary[r=true,w=false,is=true,type=boolean]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute ShardId[r=true,w=false,is=false,type=int]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute StoreSize[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@4f0ab3f2 under org.elasticsearch:service=indices,index=docs,subService=shards,shard=4
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute SizeInBytes[r=true,w=false,is=false,type=long]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Attribute Size[r=true,w=false,is=false,type=java.lang.String]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.jmx - [Xi'an Chi Xan] Registered org.elasticsearch.jmx.ResourceDMBean@6c89db9a under org.elasticsearch:service=indices,index=docs,subService=shards,shard=4,shardType=store
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.translog - [Xi'an Chi Xan] [docs][4] interval [5s], flush_threshold_ops [5000], flush_threshold_size [200mb], flush_threshold_period [30m]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.indices.memory - [Xi'an Chi Xan] recalculating shard indexing buffer (reason=created_shard[docs][4]), total is [273mb] with [4] active shards, each shard set to [68.2mb]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][4] state: [CREATED]->[RECOVERING], reason [from gateway]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][4] starting recovery from local ...
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.engine.robin - [Xi'an Chi Xan] [docs][4] Starting engine
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: done applying updated cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] applying started shards [[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], [docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.cluster.service - [Xi'an Chi Xan] cluster state updated:
version [4], source [shard-started ([docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]
nodes:
[Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]], local, master
routing_table:
-- index [docs]
----shard_id [docs][0]
--------[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][0], node[null], [R], s[UNASSIGNED]
----shard_id [docs][1]
--------[docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][1], node[null], [R], s[UNASSIGNED]
----shard_id [docs][2]
--------[docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][2], node[null], [R], s[UNASSIGNED]
----shard_id [docs][3]
--------[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][3], node[null], [R], s[UNASSIGNED]
----shard_id [docs][4]
--------[docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
--------[docs][4], node[null], [R], s[UNASSIGNED]
routing_nodes:
-----node_id[BpAQ0ifGScyV8XuVaGgLAw]
--------[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]
---- unassigned
--------[docs][0], node[null], [R], s[UNASSIGNED]
--------[docs][1], node[null], [R], s[UNASSIGNED]
--------[docs][2], node[null], [R], s[UNASSIGNED]
--------[docs][3], node[null], [R], s[UNASSIGNED]
--------[docs][4], node[null], [R], s[UNASSIGNED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]riverClusterService#updateTask-pool-10-thread-1] DEBUG org.elasticsearch.river.cluster - [Xi'an Chi Xan] processing [reroute_rivers_node_changed]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]riverClusterService#updateTask-pool-10-thread-1] DEBUG org.elasticsearch.river.cluster - [Xi'an Chi Xan] processing [reroute_rivers_node_changed]: no change in cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: done applying updated cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: no change in cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: no change in cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [master [Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]] marked shard as initializing, but shard already started, mark shard as started]]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [master [Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]] marked shard as initializing, but shard already started, mark shard as started]]: no change in cluster_state
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][4] scheduling refresher every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][4] scheduling optimizer / merger every 1s
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][4] state: [RECOVERING]->[STARTED], reason [post recovery from gateway, no translog]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] TRACE org.elasticsearch.index.shard.service - [Xi'an Chi Xan] [docs][4] refresh with waitForOperations[false]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.index.gateway - [Xi'an Chi Xan] [docs][4] recovery completed from local, took [5ms]
index : files [0] with total_size [0b], took[1ms]
: recovered_files [0] with total_size [0b]
: reusing_files [0] with total_size [0b]
translog : number_of_operations [0], took [5ms]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] sending shard started for [docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[cached]-pool-1-thread-2] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] received shard started for [docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.action.shard - [Xi'an Chi Xan] applying started shards [[docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]], reason [after recovery from gateway]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] TRACE org.elasticsearch.cluster.service - [Xi'an Chi Xan] cluster state updated:
version [5], source [shard-started ([docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]
nodes:
[Xi'an Chi Xan][BpAQ0ifGScyV8XuVaGgLAw][inet[/10.0.25.25:9300]], local, master
routing_table:
-- index [docs]
----shard_id [docs][0]
--------[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][0], node[null], [R], s[UNASSIGNED]
----shard_id [docs][1]
--------[docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][1], node[null], [R], s[UNASSIGNED]
----shard_id [docs][2]
--------[docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][2], node[null], [R], s[UNASSIGNED]
----shard_id [docs][3]
--------[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][3], node[null], [R], s[UNASSIGNED]
----shard_id [docs][4]
--------[docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][4], node[null], [R], s[UNASSIGNED]
routing_nodes:
-----node_id[BpAQ0ifGScyV8XuVaGgLAw]
--------[docs][0], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][1], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][2], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][3], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
--------[docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[STARTED]
---- unassigned
--------[docs][0], node[null], [R], s[UNASSIGNED]
--------[docs][1], node[null], [R], s[UNASSIGNED]
--------[docs][2], node[null], [R], s[UNASSIGNED]
--------[docs][3], node[null], [R], s[UNASSIGNED]
--------[docs][4], node[null], [R], s[UNASSIGNED]
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]riverClusterService#updateTask-pool-10-thread-1] DEBUG org.elasticsearch.river.cluster - [Xi'an Chi Xan] processing [reroute_rivers_node_changed]: execute
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]riverClusterService#updateTask-pool-10-thread-1] DEBUG org.elasticsearch.river.cluster - [Xi'an Chi Xan] processing [reroute_rivers_node_changed]: no change in cluster_state
20110929-14:22:18 [elasticsearch[Xi'an Chi Xan]clusterService#updateTask-pool-11-thread-1] DEBUG org.elasticsearch.cluster.service - [Xi'an Chi Xan] processing [shard-started ([docs][4], node[BpAQ0ifGScyV8XuVaGgLAw], [P], s[INITIALIZING]), reason [after recovery from gateway]]: done applying updated cluster_state
log4j.rootLogger=INFO,stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyyMMdd-HH:mm:ss} [%t] %-5p %c %x - %m%n
log4j.logger.org.elasticsearch=TRACE
package com.suckerpunch.desktopsearch;
import java.io.InputStream;
import java.util.concurrent.CountDownLatch;
import org.apache.commons.io.IOUtils;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.client.action.admin.indices.create.CreateIndexRequestBuilder;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.NodeBuilder;
public class Main {
private Node node;
public Main() throws Exception {
node = NodeBuilder.nodeBuilder().node();
node.start();
final CountDownLatch keepAliveLatch = new CountDownLatch(1);
// keep this thread alive (non daemon thread) until we shutdown
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override public void run() {
keepAliveLatch.countDown();
}
});
Thread keepAliveThread = new Thread(new Runnable() {
public void run() {
try {
keepAliveLatch.await();
} catch (InterruptedException e) {
}
}
}, "es[keepAlive]");
keepAliveThread.setDaemon(false);
keepAliveThread.start();
// IndexerMain.main(new String[]{});
System.out.println("Adding Index");
try {
CreateIndexRequestBuilder prepareCreate = node.client().admin().indices().prepareCreate(Index.INDEX);
InputStream docsMappings = IndexerMain.class.getResourceAsStream("/mappings/docs.json");
String docsMappingAsString = IOUtils.toString(docsMappings);
prepareCreate.addMapping(Index.TYPE, docsMappingAsString);
prepareCreate.execute().actionGet();
} catch (ElasticSearchException e) {
e.printStackTrace();
}
System.out.println("... added");
}
public static void main(String[] args) throws Exception {
new Main();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment