lhldyf
V2EX  ›  问与答

elasticsearch 查询求解

  •  
  •   lhldyf · Oct 18, 2016 · 1549 views
    This topic created in 3493 days ago, the information mentioned may be changed or developed.

    做 elasticsearch 开发时遇到一个问题,有没有熟悉 es 的大神帮忙看下,如下的一个数据: content traceid c1 t1 c2 t1 c1 t2 c3 t2 c4 t3

    希望根据 content = c1 , content= c2 这两个查询条件唯一确定 traceid = t1 的这条记录,想了好久没能写出一个正确的 dsl ,求大神帮忙看下.

    另外现在是用的 spring-data-elasticsearch 做的开发,这个的文档也大致看了遍,没能找到解决方案。。。

    1 replies    2016-10-18 16:35:50 +08:00
    lhldyf
        1
    lhldyf  
    OP
       Oct 18, 2016
    sorry, 数据排版不对,是这样的:
    content traceid
    c1 t1
    c2 t1
    c1 t2
    c3 t2
    c4 t3
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4613 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:09 · PVG 18:09 · LAX 03:09 · JFK 06:09
    ♥ Do have faith in what you're doing.