Israel's military said Wednesday it was looking into why soldiers at an air force base were ordered to line up in a formation spelling out the word Google for a visit by the company's top gun.

Video of the formation that spread online led to criticism in Israel, and parents questioned why soldiers were made to stand in the heat for what they saw as an inappropriate reason.

The order was issued as Eric Schmidt, executive chairman of Google's parent company Alphabet, visited the Hatzerim Air Base near the southern Israeli city of Beersheba.

Video posted to YouTube shows dozens of soldiers first standing, then sitting, in a formation on the tarmac spelling out Google, with a plane on either side of them.

The theme song from the movie "Top Gun" plays in the background.

The father of one of the soldiers was quoted by local media as saying: "I don't think this is what soldiers ought to be doing in the army."

He said the event took about 90 minutes, with aerial photos taken.

The military said in a statement that "this was an idea conceived during a visit by Google representatives to an Israel Air Force base. The matter will be looked into."

Google's spokesman in Israel said on Twitter that the company knew nothing of the order.

"See, sometimes even Google doesn't have all the answers," he said.

During his visit last week, Schmidt hailed Israel's tech sector, saying it trailed only Silicon Valley in the United States when it comes to "initiatives".  

AFP contributed this report.