@@ -117,6 +117,39 @@ can help with indexing purposes in MarkLogic as well. To include a JSON root fie
117117use the ` --json-root-name ` option with a value for the name of the root field. The data read from a
118118row will then be nested under this root field.
119119
120+ ## Ignoring null fields
121+
122+ By default, Flux will include any fields in a JSON Lines file that have a null value (this does not include
123+ a value that has whitespace) when creating JSON or XML documents. You can instead ignore fields with a null value
124+ via the ` --ignore-null-fields ` option:
125+
126+ {% tabs log %}
127+ {% tab log Unix %}
128+ ```
129+ ./bin/flux import-aggregate-json-files \
130+ --json-lines \
131+ --path path/to/file.txt \
132+ --connection-string "flux-example-user:password@localhost:8004" \
133+ --permissions flux-example-role,read,flux-example-role,update \
134+ --ignore-null-fields
135+ ```
136+ {% endtab %}
137+ {% tab log Windows %}
138+ ```
139+ bin\flux import-aggregate-json-files ^
140+ --json-lines ^
141+ --path path\to\file.txt ^
142+ --connection-string "flux-example-user:password@localhost:8004" ^
143+ --permissions flux-example-role,read,flux-example-role,update ^
144+ --ignore-null-fields
145+ ```
146+ {% endtab %}
147+ {% endtabs %}
148+
149+ The decision on whether to include null fields will depend on your application requirements. For example, if your
150+ documents have large numbers of null fields, you may find them to be noise and decide to ignore them. In another case,
151+ it may be important to query for documents that have a particular field with a value of null.
152+
120153## Specifying an encoding
121154
122155MarkLogic stores all content [ in the UTF-8 encoding] ( https://docs.marklogic.com/guide/search-dev/encodings_collations#id_87576 ) .
0 commit comments