When a document is created without setting a value for a field with a default value, this value is not written in the database, unless the field belongs to a schema with other dirty fields.
The consequence is that NXQL searches on this field won't return the expected documents because this field is actually empty/null.
- this NXQL query does not return the document, whereas it should
- this NXQL query do return the document, whereas it should not
Not that the first query run against Elasticsearch will return the document because it's the DocumentModel with the default value which is indexed.