In the digital age, the importance of data sharing has significantly increased as it accelerates the release of value from data elements. Nevertheless, data confronts substantial security threats, including potential leakage during outsourcing and sharing procedures. To ensure the security of shared data, plaintext data is often replaced by encrypted data for sharing, and searchable encryption algorithms are used to improve the efficiency of sharing. However, due to the inherent limitations of searchable encryption schemes, existing secure data-sharing approaches frequently encounter inefficient search capabilities and privacy violations. This paper proposes a secure data-sharing scheme for encrypted data that integrates blockchain with an overlapping clustering technique to tackle these challenges. The proposed scheme combines blockchain with an attribute-based searchable encryption method to guarantee data transparency, trustworthiness, and confidentiality. Furthermore, the scheme significantly enhances search efficiency and accuracy by incorporating overlapping clustering and keyword relevance-based ranking strategies. Experimental results show that this scheme effectively enhances search efficiency and provides robust privacy protection.