public virtual IDocumentQueue GetDocumentQueue(string indexName)
        {
            IDocumentQueue documentQueue;

            if (!documentQueues.TryGetValue(indexName, out documentQueue))
            {
                var writer = GetIndexWriter(indexName);
                documentQueue = new DocumentQueue(writer);
                documentQueues.TryAdd(indexName, documentQueue);
            }
            return(documentQueue);
        }
 public override void OnCompleted()
 {
     DocumentQueue.PushDocument(document);
 }
示例#3
0
 public virtual IDocumentQueue GetDocumentQueue( string indexName )
 {
     IDocumentQueue documentQueue;
     if ( !documentQueues.TryGetValue( indexName, out documentQueue ) )
     {
         var writer = GetIndexWriter( indexName );
         documentQueue = new DocumentQueue( writer );
         documentQueues.TryAdd( indexName, documentQueue );
     }
     return documentQueue;
 }