KQL, Lucenc, MS KQL, Doctrine QL, ESQL and so on

I’m confused, I need to use advanced query in discover or write filter for visualization, But KQL doesn’t have ref, and has weak tutorial.
For example I need to pipe but I can’t use them in discover.
Please guide me to use them.