We consider peer-to-peer (P2P) data sharing systems in which each peer is free to choose the ontology that best fit its needs to represent its data. This is what we call semantic heterogeneity. This situation prevents from perfect interoperability because queries issued by peers may be misunderstood by other peers. First we focus on the notion of semantic heterogeneity because it seems to us that it is a complex notion. We define several measures allowing to precisely characterize semantic heterogeneity of a P2P system according to different facets. Second we define two protocols. The first one, called CorDis, allows to reduce semantic heterogeneity related to the disparities between peers. It disseminates correspondences in the system so that peers learn new correspondences. The second protocol, called GoOD-TA, allows to reduce semantic heterogeneity related to the topology of a system. The goal is to organize it in way that semantically close peers are close in the system. Thus two peers are neighbours if they use the same ontology, or if numerous correspondences exist between their respective ontologies. Third we propose an algorithm called DiQuESH for the routing and the treatment of top-k queries in semantically heterogeneous P2P systems. This algorithm allows a peer to retrieve the k most relevant documents from its neighbourhood. We experimentally show that CorDis and GoOD-TA improve results obtained by DiQuESH.