Check Is Anagram Scala HashMap based implementation
It seems to me that groupBy() will do something very similar to your addToIndex(). The result is an immutable.Map[Char,String] instead of a mutable.HashMap[Char, Int], so the question is: which is better/easier for comparison purposes.

It turns out that the simple == evaluation is sufficiently deep to handle this.

def isAnagram(value1: String, value2: String): Boolean =
  value1.groupBy(identity) == value2.groupBy(identity)


Another, rather obvious, anagram test is simply:

value1.sorted == value2.sorted


I think, for long strings, grouping/indexing might be more efficient than sorting since each string is traversed only once. On the other hand, comparison for equality might be more complex for Maps than it would be for Strings.