Bipolar resistive switching in Si/Ag nanostructures