But this week, senior defence officials acknowledged that they simply had been unable to find Shalit.
Two years ago, then-Israeli chief of staff General Gabi Ashkenazi said during a televised appearance, "We know where Gilad is being held and who is holding him".
In retrospect, that appears to have been an attempt to get the kidnappers to shift hiding places in the hope of detecting the movement.
For much of the past few years, Israeli helicopter gunships and drones have been hunting down Hamas activists and other militants through the back alleys of Gaza City and down country backroads with uncanny accuracy.
The Shin Bet security service has achieved deep penetration of the Palestinian population in the Gaza Strip and the West Bank. Palestinian collaborators supply much of this information.
Israel was able to identify and kill at least two of the men who snatched Shalit in a daring cross-border raid.
Despite all this, and despite the fact that Gaza is only 11km wide, Shalit's captors were able to cloak their hiding place not only from Israel but from the general population in the crowded strip.
They also did their best to shield the location, and the identity of the guards, from Shalit himself.
A Palestinian radio station report this week said he never got a clear look at his captors "because of the dim light".
Shalit has not yet been interrogated by Israeli intelligence officers. On the advice of psychologists, he is being given time with his family before going through a detailed debriefing.
The captors, led by Hamas military leader Ahmed Ja'abari, reportedly made elaborate efforts to prevent Israel discovering his hiding place even as he was taken from it this week to be handed over to Egypt for the exchange with Israel. This presumably meant that he was moved at night so as not to be seen by Israeli aerial spy drones.
For Israel, the big question is how to react next time a soldier is kidnapped.
What has been implemented is a policy of vigorous attacks on those responsible for the kidnappings.
Hundreds of militants and others in the Gaza Strip were killed in Israeli incursions after Shalit's capture.
Israel also severely limited the kinds of foodstuffs and other goods that were permitted into the Gaza Strip. This antagonised much of Gaza's public against Hamas but it did not sway the militants.
In the future, the Israeli reaction can be expected to be even more forceful.