Configuration: Indexing

Indexing.RunInMemory

Set if indexes should run purely in memory.

  • Type: bool
  • Default: null
  • Scope: Server-wide or per database

When running in memory, the index information is not written to disk and if the server is restarted all indexing data will be lost. This is mostly useful for testing or faster non-persistant indexing.

If not set or set to null - indexing will run in memory if core settings RunInMemory is set to true.

Values:

  • null - use the value set in core configuration RunInMemory
  • true - run indexing in memory
  • false - store information on the disk

Indexing.Disable

Disable indexing.

  • Type: bool
  • Default: false
  • Scope: Server-wide or per database

Indexing.TempPath

Use this setting to specify a different path for the indexes' temporary files.
By default, temporary files are created under the Temp directory inside the index data directory.
Learn more about RavenDB directory structure here.

  • Type: string
  • Default: null
  • Scope: Server-wide or per database

Indexing.MaxNumberOfConcurrentlyRunningIndexes

Set how many indexes can run concurrently to prevent overwhelming system resources and slow indexing.

  • Type: int
  • Default: null No limit
  • MinValue: 1
  • Scope: Server-wide only (can be configured only in the settings.json file located in your RavenDB executable folder)

Indexing.IndexStartupBehaviorType

Manipulate index startup behavior on database load with the following options:

  • Type: string
  • Default: Each index starts as soon as it is opened.
    • Immediate: Same as default.
    • Pause: Opens all indexes, but they are paused until manually started.
    • Delay: Delays starting index processes until all indexes are open.
  • Scope: Server-wide or per database

The "Pause" or "Delay" options can prevent slow index startup behavior due to exhausted system resources when many indexes open and start processing concurrently.

Indexing.MaxTimeForDocumentTransactionToRemainOpenInSec

Set how many seconds indexing will keep document transaction open when indexing.

  • Type: int
  • Default: 15
  • Scope: Server-wide or per database

When triggered, transaction will be closed and a new one will be opened

Indexing.TimeBeforeDeletionOfSupersededAutoIndexInSec

Set how many seconds to keep a superseded auto index.

  • Type: int
  • Default: 15
  • Scope: Server-wide or per database

Indexing.TimeSinceLastQueryAfterWhichDeepCleanupCanBeExecutedInMin

Set how many minutes to wait before deep cleaning an idle index.
Deep cleanup reduces the cost of idle indexes.
It might slow the first query after the deep cleanup, thereafter queries return to normal performance.

  • Type: int
  • Default: 10
  • Scope: Server-wide or per database

Indexing.TimeToWaitBeforeMarkingAutoIndexAsIdleInMin

Set how many minutes to wait before marking auto index as idle.

  • Type: int
  • Default: 30
  • Scope: Server-wide or per database

Indexing.DisableQueryOptimizerGeneratedIndexes

Disable query optimizer generated indexes (Auto Indexes).

  • Type: bool
  • Default: false
  • Scope: Server-wide or per database

Warning

Use with caution.

Indexing.TimeToWaitBeforeDeletingAutoIndexMarkedAsIdleInHrs

Set how many hours the database should wait before deleting an auto index with the idle flag.

  • Type: int
  • Default: 72
  • Scope: Server-wide or per database

Indexing.MinNumberOfMapAttemptsAfterWhichBatchWillBeCanceledIfRunningLowOnMemory

Set minimum number of map attempts after which batch will be canceled if running low on memory.

  • Type: int
  • Default: 512
  • Scope: Server-wide or per database

Warning

Use with caution.

Indexing.NumberOfConcurrentStoppedBatchesIfRunningLowOnMemory

Number of concurrent stopped batches if running low on memory.

  • Type: int
  • Default: 3
  • Scope: Server-wide or per database

Warning

Use with caution.

Indexing.History.NumberOfRevisions

Number of index history revisions to keep per index.

  • Type: int
  • Default: 10
  • Scope: Server-wide or per database

Indexing.MapTimeoutInSec

Number of seconds after which mapping will end even if there is more to map.

  • Type: int
  • Default: -1
  • Scope: Server-wide or per database

Value of -1 for map as much as possible in single batch.

Indexing.MapTimeoutAfterEtagReachedInMin

Number of minutes after which mapping will end even if there is more to map. This will only be applied if we pass the last etag in collection that we saw when batch was started.

  • Type: int
  • Default: 15
  • Scope: Server-wide or per database

This will only be applied if we pass the last etag in collection that we saw when batch was started.

Indexing.MaxStepsForScript

The maximum number of steps in the script execution of a JavaScript index.

  • Type: int
  • Default: 10000
  • Scope: Server-wide or per database

Indexing.CleanupIntervalInMin

Time (in minutes) between auto-index cleanup.

  • Type: int
  • Default: 10
  • Scope: Server-wide only

Indexing.TransactionSizeLimitInMb

Transaction size limit in megabytes after which an index will stop and complete the current batch.

  • Type: int
  • Default: null (no limit)
  • Scope: Server-wide or per database

Indexing.Encrypted.TransactionSizeLimitInMb

Transaction size limit in megabytes for encrypted databases, after which an index will stop and complete the current batch.

  • Type: int
  • Default: 64
  • Scope: Server-wide or per database

Indexing.ScratchSpaceLimitInMb

Amount of scratch space in megabytes that we allow to use for the index storage. After exceeding this limit the current indexing batch will complete and the index will force flush and sync storage environment.

  • Type: int
  • Default: null (no limit)
  • Scope: Server-wide only or per database

Indexing.GlobalScratchSpaceLimitInMb

Maximum amount of scratch space in megabytes that we allow to use for all index storages per server. After exceeding this limit the indexes will complete their current indexing batches and force flush and sync storage environments.

  • Type: int
  • Default: null (no limit)
  • Scope: Server-wide only

Indexing.MaxTimeToWaitAfterFlushAndSyncWhenExceedingScratchSpaceLimit

Max time to wait in seconds when forcing the storage environment flush and sync after exceeding the scratch space limit.

  • Type: int
  • Default: 30
  • Scope: Server-wide only

Indexing.IndexMissingFieldsAsNull

Indicates if missing fields should be indexed same as 'null' values or not.

  • Type: bool
  • Default: false
  • Scope: Server-wide or per database

Indexing.IndexEmptyEntries

Indicates if empty index entries should be indexed by static indexes.

  • Type: bool
  • Default: false
  • Scope: Server-wide or per database

Indexing.MapBatchSize

Maximum number of documents to be processed by the index per indexing batch.

  • Type: int
  • Default: null (no limit)
  • MinValue: 128
  • Scope: Server-wide or per database

Indexing.MaxGram

Largest n-gram to generate when NGram analyzer is used.

  • Type: int
  • Default: 6
  • Scope: Server-wide or per database

Indexing.MinGram

Smallest n-gram to generate when NGram analyzer is used.

  • Type: int
  • Default: 2
  • Scope: Server-wide or per database