Configuration: Indexing


  • The below indexing configuration keys can be modified via any of the following methods:
    • As explained in the Config overview article
    • Set a custom configuration per index from the Client API
    • Set a custom configuration per index from the Studio


Indexing.CleanupIntervalInMin

Time (in minutes) between auto-index cleanup.

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

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.MaxNumberOfConcurrentlyRunningIndexes

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

  • Type: int
  • Default: null (No limit)
  • MinValue: 1
  • Scope: Server-wide only

Indexing.MaxTimeToWaitAfterFlushAndSyncWhenExceedingScratchSpaceLimitInSec

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
  • Alias: Indexing.MaxTimeToWaitAfterFlushAndSyncWhenExceedingScratchSpaceLimit

Indexing.NuGetAllowPreReleasePackages

Allow installation of NuGet prerelease packages.

  • Type: bool
  • Default: false
  • Scope: Server-wide only
  • Alias: Indexing.NuGetAllowPreleasePackages

Indexing.NuGetPackageSourceUrl

Default NuGet source URL.

  • Type: string
  • Default: https://api.nuget.org/v3/index.json
  • Scope: Server-wide only

Indexing.NuGetPackagesPath

Location of NuGet packages cache.

  • Type: string
  • Default: Packages/NuGet
  • Scope: Server-wide only

Indexing.QueryClauseCache.ExpirationScanFrequencyInSec

EXPERT ONLY:
The frequency by which to scan the query clause cache for expired values.

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

Indexing.QueryClauseCache.RepeatedQueriesCount

EXPERT ONLY:
The number of recent queries that we will keep to identify repeated queries, relevant for caching.

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

Indexing.QueryClauseCache.SizeInMb

EXPERT ONLY:

  • Maximum size that the query clause cache will utilize for caching partial query clauses,
    defaulting to 10% of the system memory on 64-bit machines.

  • The default value, which is determined based on your platform details, is set by the constructor of class IndexingConfiguration.


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

Indexing.Auto.DeploymentMode

Set the default deployment mode for auto indexes.

  • Type: enum IndexDeploymentMode (Parallel, Rolling)
  • Default: Parallel
  • Scope: Server-wide, or per database

Indexing.Auto.SearchEngineType

Set the search engine to be used with auto-indexes.

  • Type: enum SearchEngineType (Lucene, Corax)
  • Default: Lucene
  • Scope: Server-wide, or per database

Indexing.Disable

Set whether to disable all indexes in the database.
All indexes in the database will be disabled when set to true.

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

Indexing.DisableQueryOptimizerGeneratedIndexes

EXPERT ONLY:
Disable query optimizer generated indexes (auto-indexes). Dynamic queries will not be supported.

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

Indexing.ErrorIndexStartupBehavior

Set how faulty indexes should behave on database startup when they are loaded.
By default they are not started.

  • Type: enum ErrorIndexStartupBehaviorType (Default, Start, ResetAndStart)
  • Default: Default
  • Scope: Server-wide, or per database

Indexing.History.NumberOfRevisions

Number of index history revisions to keep per index.

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

Indexing.IndexStartupBehavior

  • Set how indexes should behave on database startup when they are loaded.
    By default they are started immediately.

  • Setting this param can prevent slow index startup behavior in scenarios where many indexes open and start processing concurrently, which may cause IO usage to max out system resources.


  • Type: enum IndexStartupBehaviorType (Default, Immediate, Pause, Delay)
  • Default: Default
  • Scope: Server-wide, or per database

Optional values:

  • Default: Each index starts as soon as it is loaded.
  • Immediate: Same as Default.
  • Pause: Loads all indexes, but they are paused until manually started.
  • Delay: Delays starting index processes until all indexes are loaded.

Indexing.RunInMemory

  • Set if indexes should run purely in memory.

  • When running in memory:

    • No index data is written to the disk, and if the server is restarted, all index data will be lost.
    • Note that the index definition itself is kept on disk and remains unaffected by server restarts.
    • This is mostly useful for testing or faster, non-persistent indexing.
  • If Indexing.RunInMemory is not set explicitly,
    then this configuration key will take the value of the core configuration key RunInMemory.


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

Optional values:

  • true - indexing is run only in memory
  • false - the index data is stored on disk

Indexing.SkipDatabaseIdValidationOnIndexOpening

EXPERT ONLY:
Allow to open an index without checking if current Database ID matched the one for which index was created.

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

Indexing.Static.DeploymentMode

Set the default deployment mode for static indexes.

  • Type: enum IndexDeploymentMode (Parallel, Rolling)
  • Default: Parallel
  • Scope: Server-wide, or per database

Indexing.Static.RequireAdminToDeployJavaScriptIndexes

Require database Admin clearance to deploy JavaScript indexes.

  • 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.TimeBeforeDeletionOfSupersededAutoIndexInSec

Set the number of seconds to keep a superseded auto index.

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

Indexing.TimeToWaitBeforeDeletingAutoIndexMarkedAsIdleInHrs

Set the number of hours the database should wait before deleting an auto-index that is marked as idle.

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

Indexing.TimeToWaitBeforeMarkingAutoIndexAsIdleInMin

Set the number of minutes to wait before marking an auto index as idle.

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

Indexing.Analyzers.Default

Default analyzer that will be used for fields.

  • Type: string
  • Default: LowerCaseKeywordAnalyzer
  • Scope: Server-wide, or per database, or per index

Indexing.Analyzers.Exact.Default

Default analyzer that will be used for exact fields.

  • Type: string
  • Default: KeywordAnalyzer
  • Scope: Server-wide, or per database, or per index

Indexing.Analyzers.Search.Default

Default analyzer that will be used for search fields.

  • Type: string
  • Default: RavenStandardAnalyzer
  • Scope: Server-wide, or per database, or per index

Indexing.Encrypted.TransactionSizeLimitInMb

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

  • The default value, which is determined based on your platform details, is set by the constructor of class IndexingConfiguration.


  • Type: int
  • Default: DefaultValueSetInConstructor
  • Scope: Server-wide, or per database, or per index

Indexing.IndexEmptyEntries

  • Set how the indexing process should handle documents that are missing fields.

  • When set to true, the indexing process will index documents even if they lack the fields that are supposed to be indexed.


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

Indexing.IndexMissingFieldsAsNull

  • Set how the indexing process should handle fields that are missing.

  • When set to true, missing fields will be indexed with a null value.


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

Indexing.Lucene.Analyzers.NGram.MaxGram

  • This configuration applies only to the Lucene indexing engine.

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


  • Type: int
  • Default: 6
  • Scope: Server-wide, or per database, or per index
  • Alias: Indexing.Analyzers.NGram.MaxGram

Indexing.Lucene.Analyzers.NGram.MinGram

  • This configuration applies only to the Lucene indexing engine.

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


  • Type: int
  • Default: 2
  • Scope: Server-wide, or per database, or per index
  • Alias: Indexing.Analyzers.NGram.MinGram

Indexing.Lucene.IndexInputType

Lucene index input

  • Type: enum LuceneIndexInputType (Standard, Buffered)
  • Default: Buffered
  • Scope: Server-wide, or per database, or per index

Indexing.Lucene.LargeSegmentSizeToMergeInMb

EXPERT ONLY:

  • This configuration applies only to the Lucene indexing engine.

  • The definition of a large segment in MB.
    We won't merge more than Indexing.NumberOfLargeSegmentsToMergeInSingleBatch in a single batch.

  • The default value, which is determined based on your platform details, is set by the constructor of class IndexingConfiguration.


  • Type: int
  • Default: DefaultValueSetInConstructor
  • Scope: Server-wide, or per database, or per index
  • Alias: Indexing.LargeSegmentSizeToMergeInMb

Indexing.Lucene.MaximumSizePerSegmentInMb

EXPERT ONLY:

  • This configuration applies only to the Lucene indexing engine.

  • The maximum size in MB that we'll consider for segments merging.

  • The default value, which is determined based on your platform details, is set by the constructor of class IndexingConfiguration.


  • Type: int
  • Default: DefaultValueSetInConstructor
  • Scope: Server-wide, or per database, or per index
  • Alias: Indexing.MaximumSizePerSegmentInMb

Indexing.Lucene.MaxTimeForMergesToKeepRunningInSec

EXPERT ONLY:

  • This configuration applies only to the Lucene indexing engine.

  • How long will we let merges to run before we close the transaction.


  • Type: int
  • Default: 15
  • Scope: Server-wide, or per database, or per index
  • Alias: Indexing.MaxTimeForMergesToKeepRunningInSec

Indexing.Lucene.MergeFactor

EXPERT ONLY:

  • This configuration applies only to the Lucene indexing engine.

  • Set how often index segments are merged into larger ones.
    The merge process will start when the number of segments in an index reaches this number.

  • With smaller values, less RAM is used while indexing, and searches on unoptimized indexes are faster, but indexing speed is slower.


  • Type: int
  • Default: 10
  • Scope: Server-wide, or per database, or per index
  • Alias: Indexing.MergeFactor

Indexing.Lucene.NumberOfLargeSegmentsToMergeInSingleBatch

EXPERT ONLY:


  • Type: int
  • Default: 2
  • Scope: Server-wide, or per database, or per index
  • Alias: Indexing.NumberOfLargeSegmentsToMergeInSingleBatch

Indexing.Lucene.ReaderTermsIndexDivisor

EXPERT ONLY:
Control how many terms we'll keep in the cache for each field.
Higher values reduce the memory usage at the expense of increased search time for each term.

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

Indexing.Lucene.UseCompoundFileInMerging

EXPERT ONLY:

  • This configuration applies only to the Lucene indexing engine.

  • Use compound file in merging.


  • Type: bool
  • Default: true
  • Scope: Server-wide, or per database, or per index
  • Alias: Indexing.UseCompoundFileInMerging

Indexing.ManagedAllocationsBatchSizeLimitInMb

Managed allocations limit in an indexing batch after which the batch will complete and an index will continue by starting a new one.

  • Type: int
  • Default: 2048
  • Scope: Server-wide, or per database, or per index

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, or per index

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 we saw in the collection when the batch was started.


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

Indexing.MapTimeoutInSec

Number of seconds after which mapping will end even if there is more to map.
Using the default value of -1 will map everything possible in a single batch.

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

Indexing.MaxStepsForScript

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

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

Indexing.MaxTimeForDocumentTransactionToRemainOpenInSec

Set how many seconds indexing will keep document transaction open when indexing.
When triggered, transaction will be closed and a new one will be opened.

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

Indexing.MaxTimeToWaitAfterFlushAndSyncWhenReplacingSideBySideIndexInSec

Max time to wait when forcing the storage environment flush and sync when replacing side-by-side index.

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

Indexing.Metrics.Enabled

Set whether indexing performance metrics will be gathered.

  • Type: bool
  • Default: true
  • Scope: Server-wide, or per database, or per index

Indexing.MinNumberOfMapAttemptsAfterWhichBatchWillBeCanceledIfRunningLowOnMemory

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

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

Indexing.MinimumTotalSizeOfJournalsToRunFlushAndSyncWhenReplacingSideBySideIndexInMb

Minimum total size of journals to run flush and sync when replacing side by side index in megabytes.

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

Indexing.NumberOfConcurrentStoppedBatchesIfRunningLowOnMemory

EXPERT ONLY:
Number of concurrent stopped batches if running low on memory.

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

Indexing.OrderByScoreAutomaticallyWhenBoostingIsInvolved

Set whether query results will be automatically ordered by score when a boost factor is involved in the query.
(A boost factor may be assigned inside an index definition or can be applied at query time).

  • Type: bool
  • Default: true
  • Scope: Server-wide, or per database, or per index

Indexing.OrderByTicksAutomaticallyWhenDatesAreInvolved

Sort by ticks when field contains dates.
When sorting in descending order, null dates are returned at the end with this option enabled.

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

Indexing.QueryClauseCache.Disabled

EXPERT ONLY:

  • Disable the query clause cache for a server, database, or a single index.

  • The default value is set by the constructor of class IndexingConfiguration.
    It will be true if your core configuration key Features.Availability is Not set to 'Experimental'.


  • Type: bool
  • Default: DefaultValueSetInConstructor
  • Scope: Server-wide, or per database, or per index

Indexing.QueryClauseCache.RepeatedQueriesTimeFrameInSec

EXPERT ONLY:
Queries that repeat within this time frame will be considered worth caching.

  • Type: int
  • Default: 300
  • Scope: Server-wide, or per database, or per index

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, or per database, or per index

Indexing.Static.SearchEngineType

Set the search engine to be used with static indexes.

  • Type: enum SearchEngineType (Lucene, Corax)
  • Default: Lucene
  • Scope: Server-wide, or per database, or per index

Indexing.Throttling.TimeIntervalInMs

How long the index should delay processing after new work is detected in milliseconds.

  • Type: int
  • Default: null
  • Scope: Server-wide, or per database, or per index

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, or per index

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, or per index