code: @Override
      public String getIndexName() {
          final boolean hasPrefix = !prefix.isEmpty();
          final boolean hasSuffix = !suffix.isEmpty();
  
          // Use standard method to get surname first.
          final StringBuffer buffer = new StringBuffer();
          if (surname.isEmpty()) {
              buffer.append('?');
          } else {
              buffer.append(getSurname());
          }
  
          // If prefix is present include it after ",".
          //
          // If no prefix or suffix are present , substitute "?" where prefix
          // would go.
          //
          // Suffix with no prefix is assumed to be Chinese style name with
          // surname first. No "," is inserted and the missing prefix is
          // not covered by ?.
          //
          if (hasPrefix) {
              buffer.append(", ").append(prefix);
          } else if (!hasSuffix) {
              buffer.append(", ?");
          }
  
          if (hasSuffix) {
              if (hasPrefix) {
                  buffer.append(", ").append(suffix);
              } else {
                  buffer.append(' ').append(suffix);
              }
          }
  
          return buffer.toString();
      }
docs: {@inheritDoc}