If, upon examination, it appears that there is just cause to fear that the offense will be committed by the party complained of, the party shall be required to enter into a recognizance, with sufficient sureties, in such sum as the judge directs, to keep the peace toward all the people of this state, and especially toward the persons requiring the security, for such term as the judge orders, not exceeding six months. The party complained of shall not be ordered to recognize for appearance at the district court, unless the party is charged with some offense for which the party ought to be held to answer to the court. Upon complying with the order of the judge, the party complained of shall be discharged.