I use SocketAppender to report log events to logstash which connect to elasticsearch. I record some application context info by using MDC. I hope to filter events by MDC fields. How to make mdc fields indexed or analyzed in logstash with elasticsearch?
for example:
I write : MDC.put("email", "11111@example.com")
in my java code.
I would like to search events by email:11111@example.com
which event have email field matched. but now , return results also matched example
.