Together, the (1) Halakah ("law" or "tradition"), an interpretation of the laws of the Scriptures and (2) Haggadah ("narration"), the non-legal, or homiletical, part of the Talmud are called the Midrash, a word derived from the Hebrew verb ‘darash’, meaning "to search out," or "to conduct research." The inference is that of ascertaining a thought or truth not seen on the surface-therefore a study, commentary, or homiletical exposition. The research into the meaning of the law, oral and written, was thus made a part of the Talmud. It was the earliest method used for teaching the oral law by Jewish teachers going back to about 400 B.C. The Midrash was a group of Jewish commentaries on the Hebrew Scriptures with a verse by verse interpretation written between A.D. 400 and A.D. 1200.
These commentaries are a collection of public sermons, stories, legal discussions, and meditations on the books of the Bible used during the festivals for public worship in the synagogues. The Midrash method was employed by Ezra and his associates when Ezra read the written Law to the Jews who had returned to Jerusalem from exile (Neh. 8:1-8). This method of teaching was adopted by the Hebrew scribes and was the dominant teaching method of the rabbis until ca. 270 B.C. Midrashim (plural of Midrash) were written in Israel and Babylon by the rabbis. Some Midrashim are contained in the Babylonian Talmud; others are part of independent collections of commentaries.
Distinction is made between Midrash halakah, dealing with the legal portions of Scripture, and Midrash haggada, dealing with biblical lore. Midrashic exposition of both kinds appears throughout the Talmud. Individual midrashic commentaries were composed by rabbis after the 2nd cent. A.D. up to the Middle Ages, and they were mostly of an haggadic nature, following the order of the scriptural text. Important among them are the Midrash Rabbah, a collection of commentaries on the Torah and the Five Scrolls (the Song of Songs, Esther, Ruth, Lamentations, Ecclesiastes), and the Pesikta Midrashim, concerning the festivals. This body of rabbinic literature contains the earliest speculative thought in the Jewish tradition.