Backport PR #12801 to 7.x: Docs: note on quoted field references (#12817)

see GH-5591

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
This commit is contained in:
Karol Bucek 2021-04-14 11:26:46 +02:00 committed by GitHub
parent 5a9048c4df
commit fab5dd8da8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,6 +42,12 @@ fieldReferenceLiteral
: ( pathFragment )+ : ( pathFragment )+
; ;
NOTE: In Logstash 7.x and earlier, a quoted value (such as `["foo"]`) is
considered a field reference and isn't treated as a single element array. This
behavior might cause confusion in conditionals, such as `[message] in ["foo",
"bar"]` compared to `[message] in ["foo"]`. We discourage using names with
quotes, such as `"\"foo\""`, as this behavior might change in the future.
[float] [float]
[[formal-grammar-field-reference]] [[formal-grammar-field-reference]]
==== Field Reference (Event APIs) ==== Field Reference (Event APIs)