Can i write elastic query using KQL or Lucene

I gave a more thorough answer to you in your previous post:

But yes, you should also be able to use plain lucene if you really want to by sliding off KQL:

I would recommend you trying to keep it to KQL and filters before utilizing lucene as it's a better experience and more readable and it translated to Elastic Search filters which are better performance wise than Lucene.

For example, this shows what a Lucene query would translate to:

And that's not the same as what the KQL translates to:

Which at the time of this writing is using filters which should be cached: