Questions tagged [ravendb]

RavenDB is an Open Source document database for the .NET Core platform (Windows, MacOS, Linux). RavenDB offers a flexible data model designed to fit the needs of real world systems. RavenDB stores schema-less JSON documents, and allows you to define indexes using Linq queries and focus on low latency and high performance.

RavenDB Logo

RavenDB is an Open Source (with a commercial option) document database for the .NET platform. RavenDB offers a flexible data model designed to fit the needs of real world systems. RavenDB stores schema-less JSON documents, and allows you to define indexes using Linq queries and focus on low latency and high performance.

  • Scalable infrastructure: RavenDB builds on top of existing, proven and scalable infrastructure.
  • Simple Windows configuration: RavenDB is simple to setup and run on windows as either a service or IIS7 website.
  • Transactional: RavenDB supports System.Transaction with ACID transactions. If you put data in it, that data is going to stay there.
  • Map/Reduce: Easily define map/reduce indexes with Linq queries.
  • .NET Client API: RavenDB comes with a fully functional .NET client API which implements Unit of Work and much more.
  • RESTful: RavenDB is built around a RESTful API.
  • Ad-hoc queries: RavenDB supports ad-hoc queries and automatically creates indexes on the fly - no need to write indexes upfront.

RavenDB is released under a dual Open Source license and a commercial license. Simply put, that means that it is freely available under the AGPL license but if you want to use this with proprietary software, you must buy a commercial license.

2515 questions
1
vote
2 answers

RavenDB - DateTime.Subtract Query Exception

When attempting to execute the following query on a ravendb RavenSession.Query().Any( x => DateTime.Now.Subtract( x.Submitted).TotalSeconds < 61) an argument exception ("Could not understand expression") is thrown. When this code is rewritten…
Levon
  • 574
  • 1
  • 3
  • 14
1
vote
1 answer

Storing classes with Func members in RavenDB

I have a class class Test { public string SomeValue { get; set; } public Func DoStuff { get; set; } } Which I then instantiate like the following Test t = new Test(); t.SomeValue = "Your number: "; t.DoStuff = (n) => { return…
Dänu
  • 5,791
  • 9
  • 43
  • 56
1
vote
1 answer

Json.NET serialise root object differently to descendant objects

I am using RavenDB (which itself uses Json.NET) to store documents (or aggregate roots). When I store an aggregate root, I would like the aggregate roots it references (either directly or indirectly as a descendant of another reference) to only…
user140628
1
vote
1 answer

[kernel32.dll]CreateHardLink fails with "Cannot create a file when that file already exists" on Azure Website during RavenDb Embedded backup

I'm running RavenDb.Embedded v2.0.2370 inside an Azure Web site. All of this is working as expected except for the backup. The backup routine initiated with EmbeddableDocumentStore.DocumentDatabase.StartBackup(...) used to work perfectly until I…
cgijbels
  • 5,994
  • 1
  • 17
  • 21
1
vote
1 answer

RavenDb: How to model c#-classes

I'm having this Json-data as a document in ravenDb, but I don't know how to model my c#-class/classes in my MVC 5 application to get it to work. Can someone please point me in the right direction. Thanks. { "Name": "Finland", "Code": "4234", …
user3228992
  • 1,373
  • 1
  • 16
  • 31
1
vote
1 answer

List of objects in RavenDB

Im trying to learn RavenDB in an MVC-project...Lets say we have many documents stored i a RavenDB collection looking something like this: "ShipVia": "shippers/2", "Freight": 18.66, "Lines": [ { "Product": "products/25", …
user2915962
  • 2,691
  • 8
  • 33
  • 60
1
vote
1 answer

RavenDB Static Index field with Max() aggregation

My documents have a "Comments" collection, and I'd like to index the "Last Commented Date". I have statically defined index already working for other fields, so there's nothing wrong with my index. But attempting to add this new field is not…
InfinitiesLoop
  • 14,349
  • 3
  • 31
  • 34
1
vote
1 answer

Quota for attachments in RavenDB

In my RavenDB 2.5.2851 database I want to put attachments up to 2GB. var store = new DocumentStore { Url = "http://127.0.0.1:8080" }.Initialize(); using (var reader = new StreamReader("test.attachment")) { var id = "attachments/1"; …
Eugene
  • 389
  • 1
  • 7
  • 18
1
vote
1 answer

Arbitrary searches and indices in RavenDB

My data consists of virtually flat JSON objects. Most of the fields have single values, but some have an array of single values. It never goes deeper than that. I have about 100 top level fields, and I would like to be able to search on any…
Nikhil
  • 1,121
  • 2
  • 11
  • 27
1
vote
1 answer

Ravendb strange query behaviour

Why does this work: var ret = Session.Query() .TransformWith() .ToList(); var ret2 = ret.Where(x => x.EventInstance.Slug == slug); return…
user156888
1
vote
1 answer

RavenDB - what are "string indexes"

In a question I asked in the RavenDB discussion boards about making a large number of similar indexes, I was told that I should not make "so many indexes that do the same thing" and told I should make a "string index" instead - the exact words were…
Ciel
  • 4,290
  • 8
  • 51
  • 110
1
vote
1 answer

Error when getting "Suggestions" from ShardedDocumentStore: "You cannot get database commands for this query"

I recently started using a sharded document store in my project. Going back through some old functionality that was working I am now getting an error. Wondering if getting suggestions across a sharded data store is not supported yet? Getting…
Ben Tidman
  • 2,129
  • 17
  • 30
1
vote
1 answer

RavenDB Query Aggregate Properties in Map/Reduce Index

I have a map/reduce index that looks like this (as defined on the server). Map: from request in docs.Master_Requests select new { DocumentID = Guid.NewGuid(), Year = request.Timestamp.Year, Month =…
Dylan Vester
  • 2,686
  • 4
  • 29
  • 40
1
vote
1 answer

Unit testing in RavenDB how to do it properly

So my problem is as follows...for a project we are bulding an api using RavenDb and Nancy. So my question is about unit testing...we use embeded db, which runs in memory as suggested many times. , how to proper unit test end points. For example, we…
Sinisag
  • 1,348
  • 12
  • 12
1
vote
2 answers

RavenDB - Index "Sort" seems to fail

I am attempting to instruct RavenDB to sort a specific index by a number field, the class looks like this; class Level { public int Number { get; set; } public string Id { get; set; } // other properties not…
Ciel
  • 4,290
  • 8
  • 51
  • 110