Use script in suggestion

hello

how to use script(painless) in suggestion??

Can you explain your use-case a little more? What are you trying to achieve and where do you need scripting? By default there is no script support in suggesters like the completion one.