Make the tree/text interface more flexible to various text index.