Searching operations use the famous Boyer-Moore algorithm, with global buffers to store strings to search for or replace. These commands prompt a mini-buffer or a dialog box to enter strings whether you use key bindings or menus.
Ctrl-g resets the searching commands and new strings can be entered.
The Ctrl-s or Ctrl-r commands can be repeated in the current text window as well as in any other one.
The Esc q command prompts the mini-buffer, first to set the old and new strings, then to replace (y), skip (n) or quit (q). Query replace starts from the current position.
The Esc r command also prompts the mini-buffer to set strings, but replaces all silently from the current position to the end of the buffer.