Description
the output similar items of ItemSimilarityJob for each target item may exceed the number of similar items we set to maxSimilarItemsPerItem parameter. the following code of ItemSimilarityJob.java about line NO. 200 may affect:
if (itemID < otherItemID)
else
{ ctx.write(new EntityEntityWritable(otherItemID, itemID), new DoubleWritable(similarItem.getSimilarity())); }Don't know why need to switch itemID with otherItemID, but I think a single line is enough:
ctx.write(new EntityEntityWritable(itemID, otherItemID), new DoubleWritable(similarItem.getSimilarity()));