The two main approaches to find data in peer-to-peer (P2P) systems are unstructured networks using flooding and structured networks using a distributed index. A distributed index is usually built over all keys that are stored in the network whether they are queried or not. Indexing all keys is no longer feasible when indexing metadata, as the key space becomes very large. Here we need a query-adaptive approach that indexes only keys worth indexing, i.e. keys that are queried at least with a certain frequency. In this paper we study the cost of indexing and propose a query-adaptive partial distributed hash table (PDHT) that does not keep all keys in the index. We model and analyze a scenario to show that query-adaptive partial indexing outperforms pure flooding and “index-everything” strategies. Furthermore, our scheme is able to automatically adjust the index to changing query frequencies and distributions.