并行检索索引所有数据,每批次返回默认为5000条数据，
@param index
@param scrollHandler 每批数据处理方法
@param type
@param <T>
@return
@throws ElasticSearchException
508271
public <T> ESDatas<T> searchAllParallel(String index,ScrollHandler<T> scrollHandler,  Class<T> type,int thread) throws ElasticSearchException{
		return searchAllParallel(index,  DEFAULT_FETCHSIZE,scrollHandler,type,thread);
	}
1126608
public String sendData(String jsonSource, String index, String type) {
        return sendData(jsonSource, index, type, null).getId();
    }
30626
public synchronized static Index createIndex(Class<?> type) {
        Index index = indices.get(type);
        if (index == null) {
            try {
                Indexer indexer = new Indexer();
                Class<?> currentType = type;
                while ( currentType != null ) {
                    String className = currentType.getName().replace(".", "/") + ".class";
                    InputStream stream = type.getClassLoader()
                            .getResourceAsStream(className);
                    indexer.index(stream);
                    currentType = currentType.getSuperclass();
                }
                index = indexer.complete();
                indices.put(type, index);
            } catch (IOException e) {
                throw new RuntimeException("Failed to initialize Indexer", e);
            }
        }
        return index;
    }
840088
public SearchResponse searchAllWithTargetCount(String[] indices,
            String[] types, QueryBuilder filterQueryBuilder,
            AggregationBuilder[] aggregationBuilders) {
        return searchWithTargetCount(
                getSearchRequestBuilderWithMatchAll(false, indices, types,
                        filterQueryBuilder), aggregationBuilders);
    }
524428
private static int index(Object o) {
        Integer i = TYPE_INDICES.get(o);
        if (i == null) {
            synchronized (TYPE_INDICES) {
                // check that another thread did not already update the index
                i = TYPE_INDICES.get(o);
                if (i != null)
                    return i;
                else {
                    int j = TYPE_INDICES.size();
                    TYPE_INDICES.put(o, j);
                    TYPES.add(o);
                    return j;
                }
            }
        }
        return i;
    }
161845
public void sendWithBulkProcessor(List<? extends Map<String, ?>> bulkSource,
            String index, String type) {
        sendWithBulkProcessor(bulkSource.stream().map(
                source -> buildIndexRequest(index, type, null).source(source))
                .collect(toList()));
    }
1355313
public SearchResponse searchAllWithTargetCount(String[] indices,
            String[] types, QueryBuilder filterQueryBuilder) {
        return searchAllWithTargetCount(indices, types, filterQueryBuilder,
                null);
    }
107548
public void deleteBulkDocsAsync(String index, String type) {
        executeBulkRequestAsync(buildDeleteBulkRequestBuilder(
                buildAllDeleteRequestBuilderList(index, type)));
    }
1274709
public <T> T getDocument(String indexName, String indexType,String documentId,Class<T> beanType) throws ElasticSearchException{
		return getDocument(  indexName,   indexType,  documentId,(Map<String,Object>)null,beanType);
	}
640050
@Override
    public boolean supportsResultSetType(int type) throws SQLException
    {
        checkClosed();
        if (type == ResultSet.TYPE_SCROLL_INSENSITIVE)
            return true;
        return false;
    }
92496
public void sendWithBulkProcessorAndObjectMapper(Object object,
            String index, String type) {
        sendWithBulkProcessorAndObjectMapper(object, index, type, null);
    }
1193031
def get_elastic_items(elastic, elastic_scroll_id=None, limit=None):
    

    scroll_size = limit
    if not limit:
        scroll_size = DEFAULT_LIMIT

    if not elastic:
        return None

    url = elastic.index_url
    max_process_items_pack_time = "5m"  # 10 minutes
    url += "/_search?scroll=%s&size=%i" % (max_process_items_pack_time,
                                           scroll_size)

    if elastic_scroll_id:
        # Just continue with the scrolling
        url = elastic.url
        url += "/_search/scroll"
        scroll_data = {
            "scroll": max_process_items_pack_time,
            "scroll_id": elastic_scroll_id
        }
        res = requests.post(url, data=json.dumps(scroll_data))
    else:
        query = """
        {
            "query": {
                "bool": {
                    "must": []
                }
            }
        }
        """

        logging.debug("%s\n%s", url, json.dumps(json.loads(query), indent=4))
        res = requests.post(url, data=query)

    rjson = None
    try:
        rjson = res.json()
    except Exception:
        logging.error("No JSON found in %s", res.text)
        logging.error("No results found from %s", url)

    return rjson
547197
public List<String> extractIdList(String index, String type,
            QueryBuilder filterQueryBuilder) {
        return extractIdList(
                searchAllWithTargetCount(index, type, filterQueryBuilder));
    }
177910
public SearchRequestBuilder getSearchRequestBuilder(boolean isSetExplain,
            String[] indices, String[] types) {
        return getSearchRequestBuilder(isSetExplain, indices, types, null);
    }
641823
public void index(String indexName, String indexType, Map<CharSequence, CharSequence> idJsonMap) {
        index(
                idJsonMap.entrySet().stream()
                        .map(entry -> new IndexRequest.IndexRequestBuilder(indexName, indexType, entry.getValue().toString())
                                .withId(entry.getKey().toString()).build()
                        )
                        .collect(toList())
        );
    }
240196
public static final IndexReference indexRef(String indexName, IndexType type) {
        if (type == null) {
            return new IndexReference("`" + indexName + "`");
        }
        return new IndexReference("`" + indexName + "` USING " + type.toString());
    }
115432
public <T> ESDatas<T> searchAll(String index,  Class<T> type) throws ElasticSearchException{

		return searchAll(  index,    DEFAULT_FETCHSIZE , type) ;

	}