@Override protected void prepareIndexRequest(IndexRequestBuilder indexRequest, String indexName, String indexType, Event event) throws IOException { BytesStream contentBuilder = serializer.getContentBuilder(event); indexRequest.setIndex(indexName) .setType(indexType) .setSource(contentBuilder.bytes()); } }
/** * Set the destination index. */ public ReindexRequestBuilder destination(String index) { destination.setIndex(index); return this; }
/** * Set the destination index and type. */ public ReindexRequestBuilder destination(String index, String type) { destination.setIndex(index).setType(type); return this; }
@Override public IndexRequestBuilder prepareIndex(String index, String type, @Nullable String id) { return prepareIndex().setIndex(index).setType(type).setId(id); }
/** * Set the destination index. */ public ReindexRequestBuilder destination(String index) { destination.setIndex(index); return this; }
/** * Set the destination index. */ public ReindexRequestBuilder destination(String index) { destination.setIndex(index); return this; }
/** * Set the destination index. */ public ReindexRequestBuilder destination(String index) { destination.setIndex(index); return this; }
/** * Set the destination index. */ public ReindexRequestBuilder destination(String index) { destination.setIndex(index); return this; }
/** * Set the destination index. */ public ReindexRequestBuilder destination(String index) { destination.setIndex(index); return this; }
/** * Set the destination index and type. */ public ReindexRequestBuilder destination(String index, String type) { destination.setIndex(index).setType(type); return this; } }
/** * Set the destination index and type. */ public ReindexRequestBuilder destination(String index, String type) { destination.setIndex(index).setType(type); return this; }
/** * Set the destination index and type. */ public ReindexRequestBuilder destination(String index, String type) { destination.setIndex(index).setType(type); return this; }
/** * Set the destination index and type. */ public ReindexRequestBuilder destination(String index, String type) { destination.setIndex(index).setType(type); return this; } }
/** * Set the destination index and type. */ public ReindexRequestBuilder destination(String index, String type) { destination.setIndex(index).setType(type); return this; }
private IndexRequestBuilder createIndex(Object object) { @SuppressWarnings("unchecked") final Map<String, String> indexInformation = (Map<String, String>) object; final IndexRequestBuilder prepareIndex = client.prepareIndex(); if (indexInformation.containsKey(INDEX_NAME_ELEMENT)) { prepareIndex.setIndex(indexInformation.get(INDEX_NAME_ELEMENT)); } if (indexInformation.containsKey(INDEX_TYPE_ELEMENT)) { prepareIndex.setType(indexInformation.get(INDEX_TYPE_ELEMENT)); } if (indexInformation.containsKey(INDEX_ID_ELEMENT)) { prepareIndex.setId(indexInformation.get(INDEX_ID_ELEMENT)); } return prepareIndex; }
@Override protected void prepareIndexRequest(IndexRequestBuilder indexRequest, String indexName, String indexType, Event event) throws IOException { XContentBuilder contentBuilder = serializer.getContentBuilder(event); // toFixed ?yinbp indexRequest.setIndex(indexName) .setType(indexType) .setSource(contentBuilder ); } }
@Override public IndexRequestBuilder prepareIndex(String index, String type, @Nullable String id) { return prepareIndex().setIndex(index).setType(type).setId(id); }
@Override protected void prepareIndexRequest(IndexRequestBuilder indexRequest, String indexName, String indexType, Event event) throws IOException { BytesStream contentBuilder = serializer.getContentBuilder(event); indexRequest.setIndex(indexName) .setType(indexType) .setSource(contentBuilder.bytes()); } }
@Override protected void prepareIndexRequest(IndexRequestBuilder indexRequest, String indexName, String indexType, Event event) throws IOException { BytesStream contentBuilder = serializer.getContentBuilder(event); indexRequest.setIndex(indexName) .setType(indexType) .setSource(contentBuilder.bytes()); } }
@Override public IndexRequestBuilder prepareIndex(String index, String type, @Nullable String id) { return prepareIndex().setIndex(index).setType(type).setId(id); }