fix the bug of cpGroup in segment query and nearest query