Create

Create()

Creates a new index in memory.

public Index Create()

Return Value

The created index.

Examples

The example demonstrates how to create an index in memory through the index repository.

IndexRepository indexRepository = new IndexRepository();
Index index = indexRepository.Create();

See Also


Create(IndexSettings)

Creates a new index in memory.

public Index Create(IndexSettings settings)
Parameter Type Description
settings IndexSettings The index settings.

Return Value

The created index.

Examples

The example demonstrates how to create an index in memory through the index repository.

IndexRepository indexRepository = new IndexRepository();

IndexSettings settings = new IndexSettings();
settings.UseStopWords = false; // Disabling use of stop words during indexing

Index index = indexRepository.Create(settings);

See Also


Create(string)

Creates a new index on disk. The index folder will be cleaned before the index creation.

public Index Create(string indexFolder)
Parameter Type Description
indexFolder String The index folder.

Return Value

The created index.

Examples

The example demonstrates how to create an index on disk through the index repository.

string indexFolder = @"c:\MyIndex\";

IndexRepository indexRepository = new IndexRepository();
Index index = indexRepository.Create(indexFolder);

See Also


Create(string, IndexSettings)

Creates a new index on disk. The index folder will be cleaned before the index creation.

public Index Create(string indexFolder, IndexSettings settings)
Parameter Type Description
indexFolder String The index folder.
settings IndexSettings The index settings.

Return Value

The created index.

Examples

The example demonstrates how to create an index on disk through the index repository.

string indexFolder = @"c:\MyIndex\";

IndexRepository indexRepository = new IndexRepository();

IndexSettings settings = new IndexSettings();
settings.UseStopWords = false; // Disabling use of stop words during indexing

Index index = indexRepository.Create(indexFolder, settings);

See Also