Ejemplo n.º 1
0
  private String buildSolrId(K key) {
    JsonObject jsonKey = new JsonObject();
    if (key instanceof String) {
      jsonKey.putString("C", "S");
      jsonKey.putString("V", (String) key);
    } else {
      jsonKey.putString("C", key.getClass().getName());
      jsonKey.putString("V", JsonObject.toJson(key));
    }
    String id = _mapName + ":" + jsonKey.encode();

    return id;
  }