In Buddhism, dhamma vicaya (Pali; dharma-) has been variously translated as the "analysis of qualities," "discrimination of dhammas," "discrimination of states," "investigation of doctrine,"
and "searching the Truth." The meaning is ambivalent; it implies the investigation of the Buddhist teachings (dhamma), but also the application of discernment to body-mind phenomena in order to apply right effort, giving way to entry into the first jhana.
According to Rupert Gethin, "Dhamma-vicaya means either the 'discrimination of dhammas' or the 'discernment of dhamma'; to discriminate dhammas is precisely to discern dhamma."
In the Pali canon's Sutta Pitaka, this is the second of the Seven Factors of Awakening (satta bojjhagā). It is preceded by the establishment of mindfulness (sati) and applied with energy/effort (viriya) Together, mindfulness, discernment and effort calm the mind, and give way to the onset of the jhanas, which are characterised by the remaining four factors of awakening, namely rapture (piti), tranquility (passaddhi), unification (samadhi) and equanimity (upekkha). According to the Samyutta Nikaya, this factor is to be developed by paying continuous careful attention (yoniso manasikāra bahulīkāro) to the following states (dhammā): wholesome and unwholesome (kusalā-akusalā); blameable and blameless (sāvajjā-anavajjā); inferior and superior (hīna-paītā); and, evil and good (kaha-sukka). An alternate explanation in the nikayas is that this factor is aroused by "discriminating that Dhamma with wisdom" (taṃ dhamma paññāya pavicināti).
The Abhidhamma's Dhammasai even more strongly associates dhamma vicaya with paññā (wisdom) in its enumeration of wholesome states (kusalā dhammā):
What on that occasion is the faculty of wisdom (paññindriya)?
The wisdom which there is on that occasion is understanding, search, research, searching the Truth....
where "searching the Truth" is C.A.F. Rhys Davids' translation of dhammavicayo.