anchor.diff:              member __.GetRealtimeSearcher(indexName, shardNo) = 
                   maybe { let! _ = state |> getIndexState indexName
                           return (state.IndexWriters.[indexName] |> IndexWriter.getRealTimeSearcher shardNo) }
  +
  +module DocumentService = 
  +    /// Get a document by Id
  +    let getDocument (indexName) (id) = ()
  +    
  +    /// Get top 10 document from the index
  +    let getDocuments (indexName) = ()
  +    
  +    /// Add or update an existing document
  +    let addOrUpdateDocument (document : Document.T) (state : State.T) = 
  +        maybe { 
  +            do! (document :> IValidate).Validate()
  +            let _ = state |> IndexService.indexExists document.IndexName
  +            let! indexWriter = state |> IndexService.getIndexWriter (document.IndexName)
  +            indexWriter |> IndexWriter.updateDocument document
  +        }
  +    
  +    /// Add a new document to the index
  +    let addDocument (document : Document.T) = ()
  +    
  +    /// Delete a document by Id
  +    let deleteDocument (indexName) (id) = ()
  +    
  +    /// Delete all documents of an index
  +    let deleteAllDocument (indexName) = ()
  
positive.code:         delDir (info.Settings.BaseFolder)
          ok()
      
      let updateIndex (index : Index.T) (state : T) = 
          maybe { 
              let! iw = state |> getIndexWriter index.IndexName
              let! indexState = state |> getIndexState index.IndexName
  
negative.code:     
      [<Sealed>]
      type Service(analyzerService, store) = 
          let state = State.create (analyzerService, store)
          do state |> loadAllIndex
          interface IIndexService with
              member __.GetIndex(indexName) = state |> getIndex (indexName)
  