Al-Bukhari did not write a work of usul al-fiqh or legal theory (although he did touch on a few points related to usul al-fiqh in his Sahih) nor does it seem that people took him as the leader of a new school of fiqh. For example, it was al-Tirmidhi’s custom to record the opinions of the different jurists yet he only quoted al-Bukhari’s fiqh opinion once. Furthermore, many of the early scholars of hadith were so engrossed in the narration and compilation of hadith that they did not have the time to also try to disseminate principles of legal theory or jurisprudence and, therefore, some of them followed the leading Imams of fiqh of their time.
For these reasons, scholars have tried to determine what school of fiqh Imam al-Bukhari belonged to. Due to al-Bukhari’s fame and reputation, different scholars have claimed him for their own school of fiqh. For example, ibn al-Qayyim and Abu Yala include him as one of the followers of Ahmad; some even said that he was a Hanafi since he was a student of ibn Rahawaih. The most popular opinion of the later scholars, who were the ones who discussed this question, is that he was a Shafi. Al-Subki and Sadiq Hassan Khan both consider him a Shafi. 
According to Abu Hanifa, khamr (“wine” or “alcohol”) is only what has been derived from grapes and concerning which both a small or large amount is forbidden. If intoxicating beverages come from sources other than grapes, the small amount that is not intoxicating is not forbidden while the large amount that is intoxicating is forbidden. Al-Bukhari included a number of chapters intended to refute this opinion, showing that the word khamr applies to all intoxicating beverages and, hence, a small or large amount of all those beverages are forbidden. The following are his chapter titles concerning this matter:” “Alcoholic drinks may be prepared from grapes and other things,” “Liquor prepared from honey,” “Alcoholic drink is that drink which disturbs the mind,” “To drink date syrup as long as it does not intoxicate.” 
According to Abu Hanifa, the Friday prayer is only to be held in cities and not in small villages. To refute this view, al-Bukhari included a chapter entitled, “Offering Friday prayer in villages and towns.” 
In fact, it seems that al-Bukhari included an entire “Book” in the Sahih, the Book of Tricks, just to refute the errant views of ahl al-ra’i on that topic. In that book he uses the expression, “Some people say” fourteen times. Furthermore, all of the hadith he presented in that “Book” can be found elsewhere in the Sahih; that is, the Book was not added because of a relevant hadith, since there were no new hadith, but only to refute some fiqh opinions that al-Bukhari objected to. 
1 Uthmani, p. 90.
2 Al-Mudhahiri, p. 55
3 Abdul Majeed Abdul Majeed, Al-Ijtihihat al-Fiqhiya Ind Ashab al-Hadith (1979), p. 641 pp. 577-580; also see pp. 598-640.
4 See Khan, trans., vol. 7, pp. 340, 342, 344 and 349
5 Khan, trans. Vol. 2, p. 7. Note that al-Bukhari has less criticism of ahl al-ra’i than his teacher ibn Abu Shaiba. This is because some of ibn Abu Shaiba’s criticisms are not as clear and al-Bukhari supported the opinions of Abu Hanifa in those cases. Abdul Majeed concludes that al-Bukhari was more influenced by his teacher ibn Rahawaih than his teacher ibn Abu Shaiba. Abdul Majeed, p. 580.
6 Abdul Majeed, p. 598 and p. 614.