Mostly, I'm checking to see if I'm hallucinating or not before going forward....
ScaleFloatFunction.getValues iterates through all the values for a field in all the documents to find the min and max for a particular field it's using. So far, so good. But is this really necessary every time it gets called? I don't think these numbers change if the index hasn't changed, right? Couldn't the min and max just be cached the first time around? If one were to work up a patch (both 3.x and 4.x I think), I assume that reader.getVersion() and min and max could be cached the first time around and the list iterated only when the version changes... The only fly I see in the ointment is that the values would have to be shared amongst multiple threads, what's the preferred way to synchronize such a thing? It's been a long time since I've been in Java synchronization methods.... --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
