Documentation


We hereby welcome you into the RavenDB Documentation.
Feel free to explore the sizeable world of our premier NoSQL database.

Getting started

Beginner? No problem! This article will guide you through all parts of RavenDB needed for basic understanding.

 

What's new

Want to see what features we have added recently or what we are currently working on?

 

Playground Server

For all of you we have created a live server for testing purposes.

 

About examples

Few words about examples used in this documentation.

 

Become part of the community! Contribute to documentation.

What's new

3.0.30037 - 2016/01/09

Server

  • [DTC] Fixed NonAuthorativeInformation detection,
  • Added admin/generate-oauth-certificate endpoint,
  • Exports will now include documents created during the export time,
  • Fixed licensing timer leaks,
  • Minor fixes and tweaks,
  • Added a mechanism preventing from opening a resource with a different storage type than is defined in configuration,
  • Added a mechanism preventing from creating a different resource type than is defined in data directory,
  • [Scripted Index Results] will work correctly if there are multiple loads and puts of the same document in same batch,
  • [JavaScript] decreased max recursion from 1024 to 128,
  • [Replication] added LastReplicatedAttachmentEtag to the replication statistics,
  • [Patching] Inc operation will now assume that the value is Int64, not Int32,
  • Better mechanism preventing index corruption after server crash

Client API

  • support for DNX Core 5.0 (only unstable builds greater than 30011 due to NuGet policies),
  • Streams now contain full document metadata,
  • Added SetResultTransformer overload to IDocumentQuery and IAsyncDocumentQuery,
  • Query DurationMilliseconds is set to -1 when response comes from cache

Studio

  • Fixed FileSystem import,
  • Studio should not allow to 'save' locked index or should indicate after pressing save that the index is locked and changes will not be saved,
  • Minor fixes and tweaks

FileSystem

  • Failure to start FileSystem should result in 503, not 500 status code,
  • Fixed issues with recreating IndexSearcher during index reset, which could result in a failure to access index files,
  • Fixed FileSystem exports,
  • Fixed issue with streaming, now streams will exclude internal files (tombstones, deleted, synchronized),
  • Stability improvements

StorageExporter

  • Added SkipConsistencyCheck option

Smuggler

  • Better export timeout handling,
  • Enhanced server version discovery

3.0.30000 - 2015/11/19

  • [Breaking Change] Changed the build number in the RavenDB version (3.0.30000)

Server

  • [Prefetching] Fixed performance issues,
  • [Indexing] Fixed an issue with accessing index files (System.ObjectDisposedException: Cannot access '_[xxx].fdt' because the index input has been disposed or System.IO.FileNotFoundException: Can not load ICSharpCode.SharpZipLib.dll),
  • [Indexing] Fixed reduction phase which skipped docs when first time it was performed in a single step but later it was processed as a multi step operation,
  • [Indexing] Fixed race condition in Lucene.net spatial contrib,
  • [DTC] Fixed an issue with deletes performed in multiple concurrent threads (while in a distributed transaction) were not being replicated,
  • [Scripted Index Results] Fixed missing execution of index update triggers when removing from map-reduce index using RemoveFromIndexTask,
  • [Scripted Index Results] Fixed conversion of null string properties,
  • [SQL Replication] Fixed bug when comparing with null in a sql replication script,
  • [Configuration] Added Raven/Tenants/MaxConcurrentResourceLoads and Raven/Tenants/ConcurrentResourceLoadTimeout settings which limit concurrent load of resources (databases, filesystems, etc)

Client API

  • Added support for transactional sessions with DTC under async sessions,
  • Fixed an issue with unbounded results API which returned up to 128 documents when doing spatial query using Customize(),
  • Enabled compression for more requests to shrink the amount of data transferred through the network,
  • Added InMemoryDocumentSessionOperations.UnregisterMissing and invoke it before loading ConstraintDocument in bundle,
  • Added new overload of SetResultTransformer to IDocumentQuery that allows strong-typing of the transformed result independently of the type of the index entries.

Data Subscriptions

  • Changed the approach of retrieving and processing documents to avoid connection breaks caused by consuming incoming data too slowly,
  • Fixed issues related to opening a subscription depending on a specified strategy,
  • Fixed a timeout handling in subscriptions if all documents are filtered out

File systems

  • Fixed OutOfMemoryException when uploading large files or synchronizing between servers,
  • Fixed an issue that a file were accessible even though its upload has been aborted,
  • Fixed file uploads with Windows Auth enabled

Smuggler

  • Fixed the import of dump files containing Raven/Subscription/... identities used by Data Subscrptions,
  • Added support for transform / filter scripts on database export.

Studio

  • Added transform script validation for import/export operations. Fixing help message and outdated links,
  • Fixed Patch by index - query not filtering matching documents,
  • Fixed acquisition of the debug info package if the server machine has .NET installed in version 4.5.2 or 4.6,
  • Faster transitions,
  • Fixed race condition between loading the studio version and generating help link,
  • Fixed Patch page - when selecting a collection the documents are overlapping the Before Patch and After Patch,
  • Fixed Indexes page - show if index is map reduce

3.0.3800 - 2015/09/21

Server

  • Improved formatted index generation with better error handling,
  • Fixed issue with single OAuth tokens caching,
  • Larger batches are now handled better by Map-Reduce indexes,
  • Added support for HEAD request for streams,
  • Fixed ArgumentOutOfRangeException that could occur during reading from Lucene index

File systems

  • Better handling of larger files with longer names

Client API

  • Fixed issue with saving documents to proper database in ShardedBulkInsert operation,
  • Fixed issues with index generation,
  • IndexCreation now takes into account conventions,
  • Added the option to specify timeout of a subscriptions pull request

Studio

  • Fixed replication topology graph
  • Fixed replication settings page

3.0.3785 - 2015/08/31

Server

  • [Voron] increased scratch buffer size to 6144 MB and added a threshold after which indexing/reducing batch sizes will start decreasing,
  • [Voron] map/reduce optimizations. We have done major work to optimize how RavenDB uses map/reduce on Voron. As a result, map/reduce performance on Voron has improved tremendously. However, this require a migration step during the first startup,
  • [Voron] optimized recovery code heavily to support slow I/O systems on large databases,
  • Changed shutdown sequence - each database / file system waits up to 3 seconds to complete existing requests before they get aborted,
  • Fixed creation of future batches (prefetching mechanism),
  • Changed index priority does not force index reset,
  • Handled failures of index resets,
  • Fixed loading of startup tasks when hosted in IIS,
  • Fixed Lucene.Net to properly dispose files in out of disk space scenario,
  • Fixed Lucene.Net memory allocation on queries. We have drastically reduced the amount of memory that is allocated per query, and improved the performance of queries substantially
  • Better handling of buffer allocations in websockets, reduces memory fragmentation,
  • Better handling of Take() / Skip() inside an index
  • Many small perf optimizations, memory allocations reductions, object pooling, etc. Drastic reduction in memory allocations on common code paths,
  • Allow only a single index to use the fast precomputation optimization at a time (reduce memory usage if multiple medium sized indexes are changed concurrently),
  • Re-implemented memory statistics checks using native calls to avoid expensive allocations,
  • Provide more detailed information when an index is corrupted,
  • Adding endpoint for stopping/starting just reduce work. More here,
  • Less aggressive changes to the batch size at scale, being more cautious gives us a bit slower perf but more stable system under load,
  • Fixed side-by-side index updates,
  • Allowed to update side-by-side index when it is still running,
  • Fixed .NET 4.6 compilation errors,
  • Fixed an NRE when the index definition was removed forcibly when using dynamic queries,
  • Fixed error handling during disposal causing an exception to escape thread boundary and crashing,
  • Fixed FIPS licensing issue on embedded databases,
  • Fixed a finalizer usage bug causing us to try to read from a closed handle,
  • Prevent corrupted index warning when creating a map-reduce index and indexing is disabled,
  • Preventing code from trying to use disposed internal transactions,
  • Properly dispose of timer instance when shutting down a database using expiration bundle,
  • Prevent an error loading ICSharpCode.NRefactory from killing RavenDB client startup

Configuration

  • Increased Raven/Voron/MaxScratchBufferSize from 1024 to 6144. More here,
  • Added Raven/Voron/ScratchBufferSizeNotificationThreshold. More here,
  • Added Raven/MaxClauseCount. More here,
  • Added Raven/Indexing/DisableIndexingFreeSpaceThreshold. More here

File systems

  • Fixed file synchronization mechanism,
  • Fixed files handling with # character in name

Bundles

  • [Replication] Fixed request buffering issues

Client API

  • Added AbstractScriptedIndexCreationTask. More here,
  • Added SetTransformerLock command. More here,
  • Added PutIndexes command. More here,
  • Added Include<TResult>(Expression<Func<T, object>> path) to async session,
  • Implemented GetMetadataForAsync<T>(T instance) in advanced options of async session of ShardedDocumentStore,
  • WithinRadiusOf marked as obsolete in spatial querying because of the parameter order inconsistency. WithinRadius is designated to be used instead. More here,
  • Added StartEtag to SubscriptionCriteria. More here,
  • Added opening strategies to data subscriptions. More here,
  • Added BeforeAcknowledgment and AfterAcknowledgment events to data subscription. More here,
  • Added "Query parsing" measure for ShowTimings query customization. More here,
  • Added TransformerLockMode. More here,
  • Added Load overload with transformer to ILoaderWithInclude. More here,
  • IndexCreation.CreateIndexes creates indexes in a single request,
  • DocumentStore.SideBySideExecuteIndexes and DocumentStore.SideBySideExecuteIndexesAsync creates side by side indexes in a single request,
  • Implemented bulk inserts for ShardedDocumentStore,
  • Optimized memory allocation and better performance in profiling,
  • Fixed implementations of sync methods to avoid hangs,
  • Fixed caching of HttpClient,
  • Extended IEnumerable implementation of DynamicList - more available extensions in an index definition

Studio

  • Environment based studio themes. More here,
  • Added Status -> Debug -> Currently indexing,
  • Added IO Test. More here,
  • Added License server information. More here,
  • Fixed authentication by API keys,
  • Fixed inconsistency bug in Query intellisense,
  • Exposed option StoreAllFields (Edit index view),
  • Support for pre 3.0 versioning documents

Installer

  • Added options to check port availability and revoke URL reservation according to provided port number when installing on IIS,
  • Added support for IIS 10 detection on Windows 10

Smuggler

  • Fixed import of conflicted documents

Tools

  • Added Traffic recorder and simulator tool

3.0.3690 - 2015/05/22

Server

  • [JavaScript] Added IncreaseNumberOfAllowedStepsBy method. More here,
  • [JavaScript] Debug information now contains number of steps that script took,
  • [Voron] Less aggresive disk space allocation,
  • Various performance improvements

Configuration

  • Added Raven/AllowScriptsToAdjustNumberOfSteps. More here,
  • Added Raven/Voron/AllowOn32Bits. More here,
  • Added Raven/PreventSchemaUpdate. More here.

Bundles

  • [SQL Replication] Adding new replication will not force others to wait till it catches up with them

Studio

  • Patching now displays metadata,
  • Added the ability to force side-by-side index replacement,
  • Added the ability to create C# class from JSON document,
  • Various fixes and enhancements

Client API

  • added ToFacetsLazyAsync extension method to IQueryable,
  • conflicts can be automatically resolved by Client API during query operations if there is IDocumentConflictListener available

Installer

  • installer now contains NLog.Ignore.config for easier logging setup

3.0.3660 - 2015/04/07

Global

  • Various performance optimizations across both server and client

Server

  • [JavaScript] Parser now returns more descriptive errors,
  • [JavaScript] PutDocument method now returns Id of generated document,
  • [JavaScript] Each LoadDocument increases maximum number of steps in script using following formula MaxSteps = MaxSteps + (MaxSteps / 2 + (SerializedSizeOfDocumentOnDisk * AdditionalStepsPerSize)),
  • Added debug/raw-doc endpoint,
  • Prevented high CPU and excessive GC runs under low memory conditions,
  • Avoid leaking resources when failing to create a database,
  • Faster JSON serialization and deserialization,
  • Added backoff strategy for failing periodic exports,
  • Recognize Windows users with admin rights to system database as server admins,
  • Facets can now have very large number of facets

Configuration

  • Added Raven/WorkingDir. More here,
  • Added Raven/AdditionalStepsForScriptBasedOnDocumentSize (5 by default). More here,
  • Added Raven/MaxServicePointIdleTime. More here,
  • Added Raven/ImplicitFetchFieldsFromDocumentMode. More here,
  • Added Raven/Replication/ForceReplicationRequestBuffering. More here

Indexes

Bundles

  • [Periodic Export] Added support for remote folders for Amazon S3 and Microsoft Azure. Source here,
  • [SQL Replication] Renamed PerformTableQuatation to QuoteTables in SqlReplicationConfig. Source here,
  • [SQL Replication] Added Insert-only mode for tables, which will prevent deletes on that table. Source here,
  • [Replication] Added support for index and transformer replication (including deletions). Source here

Client API

  • Indexes can be deployed side-by-side using SideBySideExecute from AbstractIndexCreationTask, SideBySideCreateIndexes from IndexCreation and directly from DocumentStore using SideBySideExecuteIndex,
  • Added the ability to provide additional query to MoreLikeThis queries,
  • Added SetIndexLock to IDatabaseCommands. More here,
  • Added SetIndexPriority to IDatabaseCommands. More here,
  • Index priority can be set through IndexPriority property in IndexDefinition or Priority property in AbstractIndexCreationTask,

Smuggler

  • Added the ability to disable versioning during smuggling using disable-versioning-during-import option

FileSystem

  • Added support for @in queries (fixed the WhereIn method),
  • Added DeleteByQueryAsync to IAsyncFilesCommands,
  • Added RegisterDeletionQuery to IAsyncFilesSession,
  • Added RegisterResultsForDeletion to IAsyncFilesQuery
  • Deleted progress parameter of UploadAsync method in IAsyncFilesCommands,
  • Renamed StreamFilesAsync to StreamFileHeadersAsync in IAsyncFilesCommands,
  • Exposed Import/Export options in the Studio,
  • Exposed synchronization settings in the Studio,
  • Added concurrency checks support. Available by providing file Etags or enabling optimistic concurrency (added DefaultUseOptimisticConcurrency convention),
  • Added Take and Skip methods to querying API,
  • Fix: Registered files are tracked by session after SaveChangesAsync call,
  • Fix: Metadata update operation creates a file revision when Versioning Bundle is enabled,
  • Fix: Creating revisions of synchronized files when Versioning Bundle is enabled,
  • Fix: File revisions are not synchronized to destination file systems,
  • Added option RenameOnReset to Versioning Bundle configuration,
  • Added ability to create Versioning Bundle configuration for a specific directory,
  • Added AbstractSynchronizationTrigger trigger,
  • Added querying support for numeric metadata fields,
  • Renamed SynchronizeAsync to StartAsync in IAsyncFilesSynchronizationCommands,
  • Added support for smuggling RavenFS configurations

3.0.3599 - 2015/02/08

Server

  • preventing, by default, unrestricted access (Raven/AnonymousAccess set to Admin) to server when license is used. More here,
  • [Voron] added compaction,
  • added Data Subscriptions,
  • added admin/low-memory-notification endpoint,
  • performance improvements

Configuration

  • added Raven/Indexing/MaxNumberOfItemsToProcessInTestIndexes,
  • added Raven/Licensing/AllowAdminAnonymousAccessForCommercialUse,
  • added Raven/IncrementalBackup/AlertTimeoutHours,
  • added Raven/IncrementalBackup/RecurringAlertTimeoutDays,
  • added Raven/NewIndexInMemoryMaxTime,
  • added Raven/AssembliesDirectory,
  • added Raven/Replication/IndexAndTransformerReplicationLatency,
  • added Raven/MaxConcurrentRequestsForDatabaseDuringLoad,
  • added Raven/Replication/MaxNumberOfItemsToReceiveInSingleBatch,
  • added Raven/DynamicLoadBalancing,
  • added Raven/ExposeConfigOverTheWire

Indexes

  • test indexes. More here,
  • side-by-side indexes. More here,
  • added safe number parsing methods. More here,
  • added the ability to replicate index and transformer definitions.

Bundles

  • [Replication] Added the ability to limit maximum received number of items in single replication batch using Raven/Replication/MaxNumberOfItemsToReceiveInSingleBatch setting,
  • [Replication] Source server will take into account low-memory conditions on destination server and adjust batch size

Client API

  • added PreserveDocumentPropertiesNotFoundOnModel convention. More here,
  • highlights can be accessed when performing projection or querying map-reduce index. More here,
  • added IndexAndTransformerReplicationMode convention that indicates if index and transformer definitions should be replicated when they are created using AbstractIndexCreationTask or AbstractTransformerCreationTask. More here,
  • added Data Subscriptions.

Studio

  • more detailed indexing performance chart available at Status -> Indexing -> Indexing performance,
  • added the persist auto index view available at Status -> Debug -> Persist auto index,
  • added the explain replication view available at Status -> Debug -> Explain replication,
  • added CancellationToken support for various methods in client (e.g. in queries and commands),
  • performance improvements

3.0.3525 - 2014/11/25

Server

Bundles

  • [Periodic Export] Support for full & incremental exports,
  • [Replication] Default failover behavior for client can be defined server-side,
  • [Replication] Default server-side conflict resolver can be defined,
  • [Replication] Ability to generate replication topology. More here,
  • [SQL Replication] Ability to define connection strings,
  • [SQL Replication] Ability to use custom functions,
  • [SQL Replication] Added replication simulator,
  • [SQL Replication] Added detailed metrics

Indexes

  • indexing to memory - reducing number of I/O operations by flushing to disk only when certain threshold is passed,
  • async index deletion,
  • parallelized indexing & task execution,
  • better large document handling,
  • I/O bounded batching,
  • attachment indexing (LoadAttachmentForIndexing),
  • optimized new index creation,
  • better control for Cartesian/fanout indexing,
  • better auto-index generation,
  • ...more details here and here

Transformers

  • ability to nest transformers. More here

Client API

  • Java API,
  • fully async (sync version is using async client underneath),
  • full support for Lazy async,
  • full support for Lazy timings,
  • Embedded and Remote clients use the same code,
  • administrative operations (both database and server-wide) were separated and can be found in store.Commands.Admin and store.Commands.GlobalAdmin,
  • Bulk insert errors are handled immediately, not at the end of operation,
  • Bulk insert detect document changes and skip updated if inserted documents are the same (this way documents will not have to be re-indexed or re-replicated),
  • better memory management - less allocations,
  • missing properties retention - if there are more properties in the document on server-side than in client-side, during update (load -> change -> save) all extra properties will be retained,
  • added WhatChanged and HasChanges to session. More here
  • added GetIndexMergeSuggestions. More here.
  • patching (JavaScript) now supports custom functions,
  • optimistic concurrency can be turned on globally using store.Conventions.DefaultUseOptimisticConcurrency,
  • EmbeddedDocumentStore was moved to Raven.Database.dll,
  • ...more details here

Querying

  • renamed LuceneQuery to DocumentQuery,
  • ability to return detailed query timings. More here,
  • ability to cancel long-running queries. More here,
  • ability to explain query, by using ExplainScores in DocumentQuery,
  • MoreLikeThisQuery now supports includes. More here,

Smuggler

  • Server to server smuggling. More here

Studio