fix when search service not exists

throw an error when the search service name does not exists.
+ test
implements parsing of search pattern

refs #223
tests must be finished