anchor.diff:                  for hit in hits do
                       if search.Skip > 0 && skipped.Value < search.Skip then skipped.Value <- skipped.Value + 1
                       else 
  -                        let document = indexSearchers.[hit.ShardIndex].Doc(hit.Doc)
  -                        let fields = GetDocument(flexIndex, search, document)
  -                        let flexDocument = new ResultDocument()
  -                        flexDocument.Id <- document.Get
  -                                               (flexIndex.IndexSetting.FieldsLookup.[Constants.IdField].SchemaName)
  -                        flexDocument.IndexName <- flexIndex.IndexSetting.IndexName
  -                        flexDocument.TimeStamp <- int64 
  -                                                      (document.Get
  -                                                           (flexIndex.IndexSetting.FieldsLookup.[Constants.LastModifiedField].SchemaName))
  -                        flexDocument.Fields <- fields
  -                        if search.ReturnScore then flexDocument.Score <- float (hit.Score)
  +                        let document = indexSearchers.[hit.ShardIndex].IndexSearcher.Doc(hit.Doc)
  +                        let fields = GetDocument(indexWriter, search, document)
  +                        
  +                        let resultDoc : Document.T = 
  +                            { Id = document.Get(indexWriter.Settings.FieldsLookup.[Constants.IdField].SchemaName)
  +                              IndexName = indexWriter.Settings.IndexName
  +                              TimeStamp = 
  +                                  int64 
  +                                      (document.Get
  +                                           (indexWriter.Settings.FieldsLookup.[Constants.LastModifiedField].SchemaName))
  +                              Fields = fields
  +                              Score = 
  +                                  if search.ReturnScore then float (hit.Score)
  +                                  else 0.0
  +                              Highlights = null }
                           if highlighterOptions.IsSome then 
                               let (field, highlighter) = highlighterOptions.Value
                               let text = document.Get(field.SchemaName)
                               if text <> null then 
                                   let tokenStream = 
                                       TokenSources.GetAnyTokenStream
  -                                        (indexSearchers.[hit.ShardIndex].GetIndexReader(), hit.Doc, field.SchemaName, 
  -                                         flexIndex.IndexSetting.SearchAnalyzer)
  +                                        (indexSearchers.[hit.ShardIndex].IndexReader, hit.Doc, field.SchemaName, 
  +                                         indexWriter.Settings.SearchAnalyzer)
                                   let frags = 
                                       highlighter.GetBestTextFragments
                                           (tokenStream, text, false, search.Highlights.FragmentsToReturn)
                                   for frag in frags do
                                       if frag <> null && frag.GetScore() > float32 (0) then 
  -                                        flexDocument.Highlights.Add(frag.ToString())
  -                        yield flexDocument
  +                                        resultDoc.Highlights.Add(frag.ToString())
  +                        yield resultDoc
               }
  -        for i in 0..indexSearchers.Count - 1 do
  -            (flexIndex.Shards.[i].SearcherManager :> ReferenceManager).Release(indexSearchers.[i])
  +        for i in 0..indexSearchers.Length - 1 do
  +            (indexSearchers.[i] :> IDisposable).Dispose()
           Choice1Of2(results, recordsReturned, totalAvailable)
       
  -    let SearchDictionarySeq(flexIndex : FlexIndex, query : Query, search : SearchQuery) = 
  -        let (hits, _, recordsReturned, totalAvailable, indexSearchers) = Search(flexIndex, query, search)
  +    let SearchDictionarySeq(indexWriter : IndexWriter.T, query : Query, search : SearchQuery.T) = 
  +        let (hits, _, recordsReturned, totalAvailable, indexSearchers) = Search(indexWriter, query, search)
           let skipped = ref 0
           
           let results = 
  
positive.code:                             match p'.TryGetValue("boost") with
                              | true, b -> 
                                  match Int32.TryParse(b) with
                                  | true, b' -> q.SetBoost (float32 (b'))
                                  | _ -> ()
                              | _ -> ()
                          | None -> ()
  
negative.code:             }
          generateQuery predicate
      
      let private Search(indexWriter : IndexWriter.T, query : Query, search : SearchQuery.T) = 
          let indexSearchers = indexWriter |> IndexWriter.getRealTimeSearchers
          // Each thread only works on a separate part of the array and as no parts are shared across
          // multiple threads the below variables are thread safe. The cost of using blocking collection vs. 
          // array per search is high
          let topDocsCollection : TopDocs array = Array.zeroCreate indexSearchers.Length
          
          let sort = 
              match search.OrderBy with
              | null -> Sort.RELEVANCE
              | _ -> 
                  match indexWriter.Settings.FieldsLookup.TryGetValue(search.OrderBy) with
                  | (true, field) -> new Sort(new SortField(field.SchemaName, FieldType.sortField field.FieldType))
                  | _ -> Sort.RELEVANCE
          
          let count = 
  