anchor.diff:      
       /// Create a new index instance
       let create (settings : IndexSetting) = 
  -        let template = new ThreadLocal<DocumentTemplate>((fun _ -> DocumentTemplate.create (settings)), true)
  -        
  +        let factory = fun _ -> DocumentTemplate.create (settings)
  +        let policy = new DefaultObjectPoolPolicy<DocumentTemplate>(factory, fun _ -> true)
           // Create a shard for the index
           let createShard (n) = 
               let path = settings.BaseFolder +/ "shards" +/ n.ToString() +/ "index"
  
positive.code:     /// Replay all the uncommitted transactions from the logs
      let replayTransactionLogs (indexWriter : IndexWriter) = 
          let replayShardTransaction (shardWriter : ShardWriter) = 
              shardWriter.Status <- ShardStatus.Recovering
              // Read logs for the generation 1 higher than the last committed generation as
              // these represents the records which are not committed
              let logEntries = 
                  shardWriter.TxWriter.ReadLog(shardWriter.Generation.Value) // TODO: Find a more memory efficient way of sorting the transaction log file
                                                                             |> Seq.sortBy (fun l -> l.TransactionId)
              for entry in logEntries do
                  match entry.Operation with
                  | TxOperation.Create | TxOperation.Update -> 
                      let doc = 
                          indexWriter.Template.Value |> DocumentTemplate.updateTempate entry.Document entry.TransactionId
                      shardWriter |> ShardWriter.updateDocument (entry.Id, indexWriter.GetSchemaName(IdField.Name), doc)
                  | TxOperation.Delete -> 
                      shardWriter |> ShardWriter.deleteDocument entry.Id (indexWriter.GetSchemaName(IdField.Name))
                  | _ -> ()
              // Just refresh the index so that the changes are picked up
              // in subsequent searches. We can also commit here but it will
              // introduce blank commits in case there are no logs to replay.
  
negative.code: open FlexSearch.Api.Model
  open FlexLucene.Codecs.Bloom
  open System.Threading
  open Microsoft.Extensions.ObjectPool
  
  /// An IndexWriter creates and maintains an index. It contains a list of ShardWriters,
  /// each of which encapsulating the functionality of IndexWriter, TrackingIndexWriter and
  /// SearcherManger through an easy to manage abstraction.
  type IndexWriter = 
      { Template : DefaultObjectPool<DocumentTemplate>
        Caches : VersionCache array
        ShardWriters : ShardWriter array
        Settings : IndexSetting
  