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');

1 Answer 1

1

If you make Photos a parent document and VisitHistory a child document of Photos, you should be able to use a combination of not and has_child filters to build such request.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.