Erlang implementation of  WAND/max_score TOP-K retrieval algo.