Skip to end of metadata
Go to start of metadata
 

The code in below examples uses some methods defined in Common Utilities

Creating Index in Memory

The Recipe

  • To create an index in memory declare an object of Index

The Code

Creating Index in Memory using Index Repository

The Recipe

  • Declare repository object of IndexRepository class in order to create an index in memory using IndexRepository
  • Create an index in memory using the repository

The Code

Creating Index on Disk

The Recipe

  • To create an index on disk initialize an object of Index by passing index folder path to it

The Code

Creating Index on Disk using Index Repository

The Recipe

  • Declare repository object of IndexRepository class in order to create an index on disk using IndexRepository
  • Create an index on disk by passing the index path to "repository.Create()" method

The Code

Creating Index in Memory with Selecting Index Settings

The Recipe

  • Declare settings object of IndexingSettings class
  • Set necessary settings in IndexingSettings
  • Pass IndexingSettings object to Index

The Code

Creating Index in Memory with Selecting Index Settings using Index Repository

The Recipe

  • Declare settings object of IndexingSettings class
  • Set necessary settings in IndexingSettings
  • Declare repository object of IndexRepository class
  • Pass IndexSettings object to repository.Create() method

The Code

Creating Index on Disk with Selecting Index Settings

The Recipe

  • Declare settings object of IndexingSettings class
  • Set necessary settings in IndexingSettings
  • Pass index path and IndexingSettings object to Index

The Code

Creating Index on Disk with Selecting Index Settings using Index Repository

The Recipe

  • Declare settings object of IndexingSettings class
  • Set necessary settings in IndexingSettings
  • Declare repository object of IndexRepository class
  • Pass index path and IndexSettings object to repository.Create() method

The Code

Creating Index with Overwriting Existed one

The Recipe

  • To create an index in the folder where index exists pass to Index index path and true as the second parameter.

The Code

Labels
  • No labels