@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()); } }
public IndexRequestBuilder prepareIndex(IndexType indexType) { return new ProxyIndexRequestBuilder(nativeClient()).setIndex(indexType.getIndex()).setType(indexType.getType()); }
/** * 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 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; }
@Override public IndexRequestBuilder prepareIndex(final String index, final String type) { return new IndexRequestBuilder(this, index).setType(type); }
@Override public IndexRequestBuilder prepareIndex(final String index, final String type) { return new IndexRequestBuilder(this, index).setType(type); }
private IndexRequestBuilder createIndex(Object object) { Map<String, String> indexInformation = (Map<String, String>) object; 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; }
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 public IndexRequestBuilder prepareIndex(final String index, final String type, @Nullable final String id) { return new IndexRequestBuilder(this, index).setType(type).setId(id); }
@Override public IndexRequestBuilder prepareIndex(final String index, final String type, @Nullable final String id) { return new IndexRequestBuilder(this, index).setType(type).setId(id); }
@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 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); }
@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()); } }
public IndexRequestBuilder prepareIndex(IndexType indexType) { return new ProxyIndexRequestBuilder(nativeClient()).setIndex(indexType.getIndex()).setType(indexType.getType()); }