// Path: elasticservice/src/main/java/elasticsearch/constant/ESConstants.java
// public class ESConstants {
//     public      static  final   String STORE_INDEX = "stores";
//     public      static  final   String PRODUCT_TYPE = "product";
//     public      static  final   String SKU_TYPE = "sku";
//     public      static  final   String PRODUCT_PROPERTY = "productproperty";
//     public      static  final   String CHANNEL_TYPE = "channels";
//     public      static  final   int SNIFFER_INTERVAL = 15000;
//     public      static  final   int RESTCLIENT_TIMEOUT = 20000; // 20s
// 
// 
//     public      static  final   Pattern ROUTINGKEY_PATTERN = Pattern.compile("([\\w\\.]+)\\.(\\w+)\\.(\\d+)");
// 
// }


import elasticsearch.constant.ESConstants;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
import org.apache.http.entity.StringEntity;
import org.apache.log4j.Logger;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Hashtable;

package elasticsearch.esapi;



/**
 * Created by I311352 on 9/30/2016.
 */

@Component
public class IndexService {

// Path: elasticservice/src/main/java/elasticsearch/constant/ESConstants.java
// public class ESConstants {
//     public      static  final   String STORE_INDEX = "stores";
//     public      static  final   String PRODUCT_TYPE = "product";
//     public      static  final   String SKU_TYPE = "sku";
//     public      static  final   String PRODUCT_PROPERTY = "productproperty";
//     public      static  final   String CHANNEL_TYPE = "channels";
//     public      static  final   int SNIFFER_INTERVAL = 15000;
//     public      static  final   int RESTCLIENT_TIMEOUT = 20000; // 20s
// 
// 
//     public      static  final   Pattern ROUTINGKEY_PATTERN = Pattern.compile("([\\w\\.]+)\\.(\\w+)\\.(\\d+)");
// 
// }


// Path: elasticservice/src/main/java/elasticsearch/esapi/IndexService.java
import elasticsearch.constant.ESConstants;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
import org.apache.http.entity.StringEntity;
import org.apache.log4j.Logger;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Hashtable;

package elasticsearch.esapi;



/**
 * Created by I311352 on 9/30/2016.
 */

@Component
public class IndexService {

    private static final String CURRENT_INDEX_VERSION = ESConstants.STORE_INDEX + "_v1";
