Improved function to meet all requirements

domain now ignores index value but old index combination function is
maintained via mergeIndexFiles.py