I think this is what Scripture means when it describes David as a "man after God's own heart." As we know, David was no saint. It's pretty hard to admire David for his moral rectitude.
No, what made David unique among Israel's kings was his passion for God, his longing for God. In Psalm 42 that longing is described as a thirst:
As a deer longs for flowing streams,Such descriptions of the life of faith--longing, panting, thirsting--can seem overwrought. And I think a lot of us shy away from people in the grip of religious fervor. God-infatuated people can be hard to get along with. But in my own life, there have been moments where I have glimpsed God, where my encounter with God wasn't intellectual or moral or emotional but more direct and perceptual. A beholding. A seeing.
so I long for you, God.
I thirst for God...
In these moments there was rest and peace and joy.
And I've never stopped longing for them.