Query to return documents with id not in a list

I'm trying to create a query, but I don't want the query to return documents which have already been fetched in a previous query.
Here's the JSON

{'query': {'bool': {'filter': [{'term': {'tag': 'name'}},
    {'bool': {'must_not': [{'terms': {'meta.id': list_ids_already_fetched}}]}}]}},
 '_source': {'includes': ['data.subfield']}}

However, it seems that the query returns terms whose meta.id are in list_ids_already_fetched.

I've also done:

{'query': {'bool': {'must': [{'term': {'tag': 'name'}}],
   'must_not': [{'terms': {'meta.id': list_ids_already_fetched}}]}}}

but doesn't seem to work either.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.