Abstract We define a generalized entanglement measure in the context of the AdS/CFT correspondence. Compared to the ordinary entanglement entropy for a spatial subregion dual to the area of the Ryu-Takayanagi surface, we take into account both entanglement between spatial degrees of freedom as well as between different fields of the boundary theory. Moreover, we resolve the contribution to the entanglement entropy of strings with different winding numbers in the bulk geometry. We then calculate this generalized entanglement measure in a thermal state dual to the BTZ black hole in the setting of the D1/D5 system at and close to the orbifold point. We find that the entanglement entropy defined in this way is dual to the length of a geodesic w...