* @param measurer the distance measurer on two vectors.
* @return a brand new inverted index.
*/
public static InvertedIndex<DoubleVector, Integer> createVectorIndex(
DistanceMeasurer measurer) {
DocumentMapper<DoubleVector, Integer> mapper = new SparseVectorDocumentMapper();
DocumentDistanceMeasurer<DoubleVector, Integer> meas = VectorDocumentDistanceMeasurer
.<Integer> with(measurer);
return new InvertedIndex<>(mapper, meas);
}