Caching scorer

Caching scorer
I removed this change to use getOrDefault which was causing the compilation error, must be part of Java 8. However this default of 0 is currently in master