stroom icon indicating copy to clipboard operation
stroom copied to clipboard

Add a range-lookup() XSLT function

Open at055612 opened this issue 5 years ago • 1 comments

Currently the lookup() function will assume the passed key is a string value to lookup in the key/value store. If it can't find it it then tries to convert the key into a long and if that works does a lookup in the range store.

For use cases where the person writing the XSLT (that uses the lookup) knows the data is all range keys it would be more performant to have a range-lookup() function that went directly to the range store.

lookup() could still be used for cased where the type of key in the store is unknown.

at055612 avatar Sep 15 '20 09:09 at055612

It could be argued that lookup should only lookup in the kv store to avoid the additional lookup in the range store (if the key is a long), but changing the behaviour would impact existing uses of the lookup function.

Another option would be to add a new overloaded arg to specify the mode, auto|key|range, auto behaves as currently, key just does and key lookup and range converts to long and does a range lookup.

at055612 avatar Oct 01 '20 06:10 at055612