A flexible tree-based index structure to support edit distance search on strings