anchor.diff:          | Choice1Of2(results) -> 
               if results.Meta.RecordsReturned > 1 then 
                   !>"Duplicate Found"
  -                let targetRecords = new List<TargetRecord>()
                   let header = 
  -                    new SourceRecord(session.SessionId, SourceRecordId = record.[Constants.IdField], 
  -                                     SourceDisplayName = record.[session.DisplayFieldName])
  +                    new SourceRecord(session.SessionId, SourceRecordId = record.[Constants.IdField], SourceDisplayName = record.[session.DisplayFieldName])
                   let docs = results |> toFlatResults
  +                let mutable i = 1
                   for result in docs.Documents do
                       let resultScore = float32 result.[Constants.Score]
                       if not (result.[Constants.IdField] = header.SourceRecordId) then 
  -                        let score = docs.Meta.BestScore / resultScore * 100.0f
  +                        let score = resultScore / docs.Meta.BestScore * 100.0f
                           let targetRecord = 
  -                            new TargetRecord(session.SessionId, header.SourceId, 
  +                            new TargetRecord(session.SessionId, header.SourceId, TargetId = i, 
                                                TargetDisplayName = result.[session.DisplayFieldName], 
                                                TargetScore = score,
                                                TargetRecordId = result.[Constants.IdField])
  -                        targetRecords.Add(targetRecord)
  -                if targetRecords.Count >= 1 then writeDuplicates (header, targetRecords, documentService)
  +                        i <- i + 1
  +                        header.TargetRecords.Add(targetRecord)
  +                if header.TargetRecords.Count >= 1 then 
  +                    header.SourceId <- int (req.NextId.Increment())
  +                    writeDuplicates (header, documentService)
           | _ -> ()
       
       let performDuplicateDetection (jobId, indexWriter : IndexWriter.T, req : DuplicateDetectionRequest) = 
  
positive.code:     let sourceDisplayName = "sourcedisplayname"
      let totalDupesFound = "totaldupesfound"
      let sourceStatus = "sourcestatus"
      let targetRecordId = "targetrecordid"
      let targetDisplayName = "targetdisplayname"
      let targetScore = "targetscore"
  
negative.code:         doc.Fields.Add(sessionProperties, formatter.SerializeToString(session))
          documentService.AddOrUpdateDocument(doc) |> ignore
      
      let writeDuplicates (sourceRecord : SourceRecord, documentService : IDocumentService) = 
          let sourceDoc = new Document.Dto(schema.IndexName, getId())
          sourceDoc.Fields.Add(sessionId, sourceRecord.SessionId)
          sourceDoc.Fields.Add(sourceId, sourceRecord.SourceId.ToString())
          sourceDoc.Fields.Add(sourceRecordId, sourceRecord.SourceRecordId)
          sourceDoc.Fields.Add(sourceDisplayName, sourceRecord.SourceDisplayName)
          sourceDoc.Fields.Add(sourceStatus, sourceRecord.SourceStatus)
          sourceDoc.Fields.Add(totalDupesFound, sourceRecord.TargetRecords.Count.ToString())
          sourceDoc.Fields.Add(recordType, sourceRecordType)
          sourceDoc.Fields.Add(targetRecords, formatter.SerializeToString(sourceRecord.TargetRecords))
          documentService.AddDocument(sourceDoc) |> ignore
          
  [<Sealed>]
  [<Name("POST-/indices/:id/duplicatedetection/:id")>]
  type DuplicateDetectionHandler(indexService : IIndexService, documentService : IDocumentService, searchService : ISearchService) = 
  