소스 검색

[DOCS] EQL: Document field existence checks (#69614)

James Rodewig 4 년 전
부모
커밋
3ff1a17a79
1개의 변경된 파일23개의 추가작업 그리고 0개의 파일을 삭제
  1. 23 0
      docs/reference/eql/syntax.asciidoc

+ 23 - 0
docs/reference/eql/syntax.asciidoc

@@ -352,6 +352,29 @@ condition:
 any where true
 ----
 
+[discrete]
+[[eql-syntax-check-field-exists]]
+=== Check if a field exists
+
+To match events containing any value for a field, compare the field to `null`
+using the `!=` operator:
+
+[source,eql]
+----
+my_field != null
+----
+
+To match events that do not contain a field value, compare the field to `null`
+using the `==` operator:
+
+[source,eql]
+----
+my_field == null
+----
+
+IMPORTANT: To avoid errors, the field must contain a non-`null` value in at
+least one document or be <<explicit-mapping,explicitly mapped>>.
+
 [discrete]
 [[eql-syntax-strings]]
 === Strings