yxs19910622

es 插入新数据时可以选择不覆盖旧数据吗

  •  
  •   yxs19910622 · Apr 29, 2019 · 8486 views
    This topic created in 2582 days ago, the information mentioned may be changed or developed.
    就是碰到相同 id 就跳过 试了几种插入都被覆盖了 也没有搜到相关的配置
    1 replies    2019-04-29 12:01:47 +08:00
    AlloVince
        1
    AlloVince  
       Apr 29, 2019
    可以用 HTTP Head 检查 document 是否存在

    https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html#docs-get

    如果你是担心写入压力的问题,也可以在客户端发起请求前加去重的逻辑
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5862 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 01:55 · PVG 09:55 · LAX 18:55 · JFK 21:55
    ♥ Do have faith in what you're doing.