How can we implement painless query search condition for multi fields

As explained in this thread I believe you need to write some code in your application to handle this. I do not think using painless is the right way to go.