Commentary for Sanhedrin 5:2
כָּל הַמַּרְבֶּה בִבְדִיקוֹת, הֲרֵי זֶה מְשֻׁבָּח. מַעֲשֶׂה וּבָדַק בֶּן זַכַּאי בְּעֻקְצֵי תְאֵנִים. וּמַה בֵּין חֲקִירוֹת לִבְדִיקוֹת. חֲקִירוֹת, אֶחָד אוֹמֵר אֵינִי יוֹדֵעַ, עֵדוּתָן בְּטֵלָה. בְּדִיקוֹת, אֶחָד אוֹמֵר אֵינִי יוֹדֵעַ, וַאֲפִלּוּ שְׁנַיִם אוֹמְרִים אֵין אָנוּ יוֹדְעִין, עֵדוּתָן קַיָּמֶת. אֶחָד חֲקִירוֹת וְאֶחָד בְּדִיקוֹת, בִּזְמַן שֶׁמַּכְחִישִׁין זֶה אֶת זֶה, עֵדוּתָן בְּטֵלָה:
Whoever multiplies examinations (of the witnesses) is to be praised. Once, Ben Zakkai examined (someone) on the peduncles of figs. [("Ben Zakkai":) R. Yochanan ben Zakkai. He was a disciple judging before his master at that time, for which reason he was called "Ben Zakkai." ("on the peduncles of fruits":) They (the witnesses) testified that he was killed under a fig tree, and Ben Zakkai "examined": "Were the peduncles of the figs thin or thick?"] What is the difference between "inquiries" (chakiroth) and "examinations" (bedikoth)? With chakiroth, if one (of the witnesses) says: "I do not know," their testimony is invalidated. [For they are no longer subject to hazamah through that chakirah. And so long as it is impossible to satisfy hazamah with one of the witnesses, the entire testimony is invalidated, even if there are a hundred witnesses; for the witnesses cannot be rendered zomemin until all of them are so rendered.] With bedikoth, if one says: "I do not know," and even if two of them say: "We do not know," the testimony stands. [Even if all say: "We do not know," the mitzvah of hazamah obtains. For hazamah is contingent only upon chakirah, (leaving the witnesses open) to the claim: "You were with us at that time in a different place."] Both with chakiroth and with bedikoth, if they (the witnesses) contradict each other, their testimony is invalidated. [In all instances of "their testimony is invalidated" in the Gemara, he (the one testified against) and they (the witnesses) are exempt (from liability)].
Bartenura on Mishnah Sanhedrin
English Explanation of Mishnah Sanhedrin
What is the difference between inquiries and examinations? With regards to inquiries, if one [of the two witnesses] says “I do not know”, their evidence becomes invalid. But if to one of the examinations one answered, “I do not know”, or even if they both answered, “We do not know”, their evidence remains valid. Yet if they contradict each other, whether during the inquiries or examinations, their evidence becomes invalid.
Mishnah two continues to discuss the inquiries and examinations performed on the witnesses by the judge.
This mishnah discusses the questions regarding the circumstances of the crime itself. Although the mishnah lists seven official “inquiries” that must be asked, with regards to “examinations” the more the judge asks the better able he is to ascertain the truth. Ben Zakkai (who is usually called Rabban Yochanan ben Zakkai) once even checked to see if the witnesses who testified that a murder was committed under a fig tree knew what the stalks of the figs looked like.
The second half of the mishnah discusses cases where one of the witnesses does not know the answer to one of the questions. If the witness could not say where the crime took place or when it took place, both of the witnesses testimony becomes invalid. These are called “inquiries”. However, if one cannot answer with certainty one of the substantive questions regarding the crime, the rest of his testimony is not invalidated. These are called “examinations”. Even if both cannot answer the question, the other parts of their testimony are not necessarily invalidate. In other words, not knowing a detail does not necessarily disqualify all of their testimony. Rather the judges will have to decide when making their decision if there exists enough testimony to convict the accused.
If, however, the two witnesses disagree with regards to a detail, then all of their testimony is invalid.