Let me try to explain my line of reasoning... i dont know if it will work but...
Its been mentioned before on previous issues that it would be nice if people could have norms impls that arent a huge byte or whatever.
Currently, all of our provided Similarities will not work if hasArray() is false. So if you want to have an alternative norms data structure,
perhaps some space tradeoff, or based on something you know about your data, it currently requires you to write a custom Similarity too
I've been curious to test: if the norms impl is really just a byte, would scoring via the docvalues apis (rather than hasArray) really
slow things down?
Because if we just had a getByte(int doc), I think its feasible it would cost nothing over getArray() and byte[doc]... Then people could
make alternative implementations without also making custom Similarities.
But i'm nervous about all the casting of bytes to longs and such, I also feel the api is a little confusing...
With those methods in place we just gonna cast around which should be done by the user of the API.
But how are we not casting to long now (e.g. single-byte norms case) ?