Implement online mode, search nearest vector from histograms.