Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B3CA19FD1 for ; Mon, 28 Mar 2016 21:32:47 +0000 (UTC) Received: (qmail 44417 invoked by uid 500); 28 Mar 2016 21:32:47 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 44326 invoked by uid 500); 28 Mar 2016 21:32:47 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 44316 invoked by uid 99); 28 Mar 2016 21:32:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2016 21:32:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id CFFE6C2663 for ; Mon, 28 Mar 2016 21:32:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.448 X-Spam-Level: * X-Spam-Status: No, score=1.448 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id x-PCYALB-WiW for ; Mon, 28 Mar 2016 21:32:46 +0000 (UTC) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id C3E0D5FAC9 for ; Mon, 28 Mar 2016 21:32:45 +0000 (UTC) Received: by mail-io0-f169.google.com with SMTP id a129so8797462ioe.0 for ; Mon, 28 Mar 2016 14:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=1aNeGOwpMWQZr6780DiVVRUWKBGyOB7bKESJKrgYrmQ=; b=CZQpQL/QtKxiZh07VahuRTTgLpMXkYdxcnhJMdnQ9D3MTfBCHG8Ed/AGmxwj/uefyz ssYBFWTcKYA5fePGiNWJ2wdQVYeacBhcgmGAkuR/PAt73tKigIUZ2STXgjM4vax2pMtU zAoqtOTXClj+W/dZa7ZzSrd7XAZrDHiyG3wGiqWhdY17bJtsSO+ubFkmd03ACqWcgWQ8 TcO4Fh2V7B8jhmtfIYt52nK+Q6oEX0ZlIy2kmmejsLwPA/qp1JX45l1qeMNvZWchQWtE VFEmyF2EK60x0e51kliLSBXZlFatO3WwAwaAMa5mFiFu/LzAWP5nakzbFJDRUKvguX9f U/DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=1aNeGOwpMWQZr6780DiVVRUWKBGyOB7bKESJKrgYrmQ=; b=Zo4VXECa9c+vLF1HVIxS0jRHn/IL1xRfHqf5VhaQrQ2VIpTgp8P/AXVXz4DkbaTg7s fWIwt47muQl2cIHNQdo+mbxSiKi1GiFXaN5+yS0dPLIZIQXuuE7NaXZUsb033b1Jspax jYOCNcstQz6Lw5DvnvgBRxGCcz3YsJx3nC30csyuQOIZfTduRo6bJt6ouJ7OQqHB5qIb hooFUzVmJktzLqdWHbjiGaSaSX98ayoyi/CXn7MWcV3g2mncuGgP764QUUH8Ao0QgBLk kn0FLdsu1LyCojEH/W33OD+hDciKqMYhoYajjfdEOQlkctNyf7TFDn2is1RimwBrRACe 5seg== X-Gm-Message-State: AD7BkJIvU9dTYlrmz+3IkCo8UbDaeyjDSeMvhfeVnTeGhZ/ynQBtZ2vwY3P7G9yw3lJreV/vqHyJS2aje4U+Kg== X-Received: by 10.107.129.206 with SMTP id l75mr8929748ioi.141.1459200764806; Mon, 28 Mar 2016 14:32:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Zach Cox Date: Mon, 28 Mar 2016 21:32:34 +0000 Message-ID: Subject: Re: Upserts with Flink-elasticsearch To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a113ecfc03e0c36052f22a73a --001a113ecfc03e0c36052f22a73a Content-Type: text/plain; charset=UTF-8 Hi Madhukar - with the current Elasticsearch sink in Flink 1.0.0 [1], I don't think an upsert is possible, since IndexRequestBuilder can only return an IndexRequest. In Flink 1.1, the Elasticsearch 2.x sink [2] provides a RequestIndexer [3] that you can pass an UpdateRequest to do an upsert. Thanks, Zach [1] https://ci.apache.org/projects/flink/flink-docs-release-1.0/apis/streaming/connectors/elasticsearch.html [2] https://ci.apache.org/projects/flink/flink-docs-master/apis/streaming/connectors/elasticsearch2.html [3] https://ci.apache.org/projects/flink/flink-docs-master/api/java/org/apache/flink/streaming/connectors/elasticsearch2/RequestIndexer.html On Mon, Mar 28, 2016 at 2:18 PM Madhukar Thota wrote: > Is it possible to do Upsert with existing flink-elasticsearch connector > today? > --001a113ecfc03e0c36052f22a73a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Madhukar - with the current Elasticsearch sink in Flink= 1.0.0 [1], I don't think an upsert is possible, since IndexRequestBuil= der can only return an IndexRequest.

In Flink 1.1, the E= lasticsearch 2.x sink [2] provides a RequestIndexer [3] that you can pass a= n UpdateRequest to do an upsert.

Thanks,
Zach