C# Class Raven.Database.Indexing.IndexStorage

Thread safe, single instance for the entire application
Inheritance: System.Runtime.ConstrainedExecution.CriticalFinalizerObject, IDisposable
显示文件 Open project: nhsevidence/ravendb Class Usage Examples

Public Methods

Method Description
CreateIndexImplementation ( Raven.Database.Indexing.IndexDefinition indexDefinition ) : void
DeleteIndex ( string name ) : void
Dispose ( ) : void
FlushMapIndexes ( ) : void
FlushReduceIndexes ( ) : void
GetIndexExtension ( string index, string indexExtensionKey ) : IIndexExtension
GetLuceneQuery ( string index, IndexQuery query, OrderedPartCollection indexQueryTriggers ) : Query
HasIndex ( string index ) : bool
Index ( string index, AbstractViewGenerator viewGenerator, IEnumerable docs, WorkContext context, IStorageActionsAccessor actions, System.DateTime minimumTimestamp ) : void
IndexStorage ( IndexDefinitionStorage indexDefinitionStorage, InMemoryRavenConfiguration configuration ) : System
Query ( string index, IndexQuery query, bool>.Func shouldIncludeInResults, FieldsToFetch fieldsToFetch, OrderedPartCollection indexQueryTriggers ) : IEnumerable
Reduce ( string index, AbstractViewGenerator viewGenerator, IEnumerable mappedResults, WorkContext context, IStorageActionsAccessor actions, string reduceKeys ) : void
RemoveFromIndex ( string index, string keys, WorkContext context ) : void
SetIndexExtension ( string indexName, string indexExtensionKey, IIndexExtension suggestionQueryIndexExtension ) : void

Protected Methods

Method Description
EnsureInvariantCulture ( ) : IDisposable
OpenOrCreateLuceneDirectory ( Raven.Database.Indexing.IndexDefinition indexDefinition, string indexName = null ) : Lucene.Net.Store.System.IO.Directory

Private Methods

Method Description
AssertAnalyzersValid ( Raven.Database.Indexing.IndexDefinition indexDefinition ) : void
CreateIndexImplementation ( string directoryPath, Raven.Database.Indexing.IndexDefinition indexDefinition, Lucene directory ) : Index
GetCurrentIndexSearcher ( string indexName, IndexSearcher &searcher ) : IDisposable

if you are calling this method, you _have_ to call searcher.GetIndexReader().DecRef(); when you are done searching

GetIndexByName ( string indexName ) : Index
MakeRAMDirectoryPhysical ( RAMDirectory ramDir, string indexName ) : Lucene.Net.Store.System.IO.Directory

Method Details

CreateIndexImplementation() public method

public CreateIndexImplementation ( Raven.Database.Indexing.IndexDefinition indexDefinition ) : void
indexDefinition Raven.Database.Indexing.IndexDefinition
return void

DeleteIndex() public method

public DeleteIndex ( string name ) : void
name string
return void

Dispose() public method

public Dispose ( ) : void
return void

EnsureInvariantCulture() protected static method

protected static EnsureInvariantCulture ( ) : IDisposable
return IDisposable

FlushMapIndexes() public method

public FlushMapIndexes ( ) : void
return void

FlushReduceIndexes() public method

public FlushReduceIndexes ( ) : void
return void

GetIndexExtension() public method

public GetIndexExtension ( string index, string indexExtensionKey ) : IIndexExtension
index string
indexExtensionKey string
return IIndexExtension

GetLuceneQuery() public method

public GetLuceneQuery ( string index, IndexQuery query, OrderedPartCollection indexQueryTriggers ) : Query
index string
query Raven.Database.Data.IndexQuery
indexQueryTriggers OrderedPartCollection
return Query

HasIndex() public method

public HasIndex ( string index ) : bool
index string
return bool

Index() public method

public Index ( string index, AbstractViewGenerator viewGenerator, IEnumerable docs, WorkContext context, IStorageActionsAccessor actions, System.DateTime minimumTimestamp ) : void
index string
viewGenerator Raven.Database.Linq.AbstractViewGenerator
docs IEnumerable
context WorkContext
actions IStorageActionsAccessor
minimumTimestamp System.DateTime
return void

IndexStorage() public method

public IndexStorage ( IndexDefinitionStorage indexDefinitionStorage, InMemoryRavenConfiguration configuration ) : System
indexDefinitionStorage Raven.Database.Storage.IndexDefinitionStorage
configuration InMemoryRavenConfiguration
return System

OpenOrCreateLuceneDirectory() protected method

protected OpenOrCreateLuceneDirectory ( Raven.Database.Indexing.IndexDefinition indexDefinition, string indexName = null ) : Lucene.Net.Store.System.IO.Directory
indexDefinition Raven.Database.Indexing.IndexDefinition
indexName string
return Lucene.Net.Store.System.IO.Directory

Query() public method

public Query ( string index, IndexQuery query, bool>.Func shouldIncludeInResults, FieldsToFetch fieldsToFetch, OrderedPartCollection indexQueryTriggers ) : IEnumerable
index string
query Raven.Database.Data.IndexQuery
shouldIncludeInResults bool>.Func
fieldsToFetch FieldsToFetch
indexQueryTriggers OrderedPartCollection
return IEnumerable

Reduce() public method

public Reduce ( string index, AbstractViewGenerator viewGenerator, IEnumerable mappedResults, WorkContext context, IStorageActionsAccessor actions, string reduceKeys ) : void
index string
viewGenerator Raven.Database.Linq.AbstractViewGenerator
mappedResults IEnumerable
context WorkContext
actions IStorageActionsAccessor
reduceKeys string
return void

RemoveFromIndex() public method

public RemoveFromIndex ( string index, string keys, WorkContext context ) : void
index string
keys string
context WorkContext
return void

SetIndexExtension() public method

public SetIndexExtension ( string indexName, string indexExtensionKey, IIndexExtension suggestionQueryIndexExtension ) : void
indexName string
indexExtensionKey string
suggestionQueryIndexExtension IIndexExtension
return void