Integrated name generation logic for relative search