diff --git a/source/tutorial/query-for-null-fields.txt b/source/tutorial/query-for-null-fields.txt index d9a56856345..43b86310fc6 100644 --- a/source/tutorial/query-for-null-fields.txt +++ b/source/tutorial/query-for-null-fields.txt @@ -6,12 +6,6 @@ Query for Null or Missing Fields .. default-domain:: mongodb -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - Different query operators in MongoDB treat ``null`` values differently. .. |query_operations| replace:: operations that query for ``null`` values @@ -34,9 +28,20 @@ Different query operators in MongoDB treat ``null`` values differently. Equality Filter --------------- -The ``{ item : null }`` query matches documents that either -contain the ``item`` field whose value is ``null`` *or* that -do not contain the ``item`` field. +.. tabs:: + + tabs: + - id: shell + content: | + The ``{ item : null }`` query matches documents that either + contain the ``item`` field whose value is ``null`` *or* that + do not contain the ``item`` field. + + - id: python + content: | + The ``{ item : None }`` query matches documents that either + contain the ``item`` field whose value is ``null`` *or* that + do not contain the ``item`` field. For example, the following query returns both documents: