We will consider the optimal search for a target whose motion is a Markov process. The classical detection law leads to the use of multiplicative functionals and the search is equivalent to the termination of the Markov process with a termination density. A general condition for the optimality is derived and for Markov processes in n-dimensional Euclidean space with continuous transition functions we derive a simple necessary condition which generalizes the result of Hellman (1972).