code: public void index(Record record) {
      for (Property p : config.getIdentityProperties()) {
        Collection<String> values = record.getValues(p.getName());
        if (values == null)
          continue;
        
        for (String id : values)
          idindex.put(id, record);
      }
      records.add(record);
    }
  
    /**
     * Look up record by identity.
     */
    public Record findRecordById(String id) {
      return idindex.get(id);
    }
  
    /**
     * Look up potentially matching records.
     */
    public Collection<Record> findCandidateMatches(Record record) {
      return records;
    }
  
    /**
     * Flushes all changes to disk. For in-memory databases this is a
     * no-op.
     */
    public void commit() {
    }
    
    /**
     * Stores state to disk and closes all open resources.
     */
    public void close() {
    }
  
    public String toString() {
      return "InMemoryDatabase";
    }
  }
docs: Add the record to the index.