1

I have two types stored in ES:

  • Photos (fields: photo-id, description, createDateAsLong)
  • VisitHistory (username, photo-id - with 30days TTL)

Is it possible to query ES for records of type Photos which photo-id doesn't exists in VisitHistory (for some username value). I mean a query which is equivalent of sql query like this:

SELECT * FROM Photos WHERE photo-id NOT IN (SELECT photo-id FROM VisitHistory WHERE username = 'somefoousername');

4

1 回答 1

1

如果您将 Photos 设为父文档并将 VisitHistory 设为 Photos 的文档,您应该能够使用组合nothas_child过滤器来构建此类请求。

于 2012-11-16T03:40:02.967 回答