The paper considers a search model for an object whose type is unknown. The object with type k has a prior existence distribution on n boxes and regular detection function in each box, which are dependent on k. The objective is to maximize a detection probability by a given amount of continuous search effort. In the case of Bayesian approach, the analysis is made by both a dynamic programming and a nonlinear programming and the same result is derived that is to say, the optimal policy is to search at each time in only boxes having a maximal posterior detection rate at the ratios holding the equalities of their detection rates. Furthermore the paper considers the case of a minimax approach and derives a method for obtaining the optimal policy.