code: public void addTermReferences(TableDefinition tableDef, int shardNumber,
                                    Map<String, Set<String>> fieldTermsRefMap) {
          StringBuilder rowKey = new StringBuilder();
          for (String fieldName : fieldTermsRefMap.keySet()) {
              for (String term : fieldTermsRefMap.get(fieldName)) {
                  rowKey.setLength(0);
                  if (shardNumber > 0) {
                      rowKey.append(shardNumber);
                      rowKey.append("/");
                  }
                  rowKey.append(TERMS_REGISTRY_ROW_PREFIX);
                  rowKey.append("/");
                  rowKey.append(fieldName);
                  addColumn(SpiderService.termsStoreName(tableDef), rowKey.toString(), term);
              }
          }
      }
docs: Add term references for the given field-to-term map. This map indicates terms used
  by fields belonging to the given table that are indexed in the Terms table.
  <br>
  Term references are "sharding aware", which means the references represent objects
  that belong to a specific shard. The format of the field references row for shard
  number 0 is:
  <pre>
  _terms/{field name} = {{term 1}:null, {term 2}:null, ...}
  </pre>
  For shard numbers > 0, the row looks like this:
  <pre>
  {shard}/_terms/{field name} = {{term 1}:null, {term 2}:null, ...}
  </pre>
  
  @param tableDef          Table that owns all field/term references in the map.
  @param shardNumber       Shard number of object that owns the given field values.
  @param fieldTermsRefMap  Map of field names to terms referenced.