How to use SearchQuery?

Hello. I want to use createPanel() in searchConfig in @codemirror/search package. It is great to customize the search inputs and add more search options. My panel (panel made by createPanel()) should create new SearchQuery and update it when the user controlls changed. But how to choose on which editor (or maybe state?) the effect (this SearchQuery) should be applied?

setSearchQuery returns an effect. Dispatch it to a specific editor with view.dispatch({effects: setSearchQuery(...)}).

It works perfect! Thanks for your time.