You can send command to Emacs (running in server mode) using emacsclient
.
For example :
emacsclient --eval "(org-search-view nil """pattern""")"
If the elisp becomes too complex, you might be better of wrapping it in a file that you can load. For example :
fun.el
(defun my/search (pattern) (with-current-buffer "BUFFER-NAME" (search-forward pattern)))
command-line
emacsclient --load fun.el --eval '(my/search "PATTERN")'