Hierarchical Navigable Small World (HNSW) has demonstrated impressive accuracy and low latency for high dimensional nearest neighbor searches. However, its high computational demands and irregular, large-volume data access patterns present significant challenges to search efficiency. To address these challenges, we introduce P-HNSW, a software-hardware codesign solution for HNSW that integrates a Principal Component Analysis Filter (PCAF). On the software side, we apply PCAF to reduce dataset dimensionality, thereby lowering the volume of neighbor access and decreasing the computational load for distance calculations. On the hardware size, we design the P-HNSW processor with custom instructions to optimize search throughput and energy efficiency. Experimental results from RTL design synthesized using a 65nm technology node show that the proposed P-HNSW implementation achieves an 11.65× increase in Queries per Second (QPS) and a 56.8% reduction in energy consumption, compared to the original HNSW implementation