ravendb

Multi Map / Reduce index vs. relational join

落爺英雄遲暮 提交于 2019-12-11 01:39:11
问题 One of the key factors making NoSQL databases more scalable is absense of join operation which is essential part of RDBMS. But at the same time, for example, RavenDb contains Multi Maps / Reduce index feature which looks similar to join. Why do joins limitate scalability but Multi Maps / Reduce indexes do not while they solve pretty similar tasks? 回答1: It depends on when you are actually perform the operation. Join operations are usually executed on the fly, which means that your incur the

RavenTimeoutPersistence error when starting NserviceBus.host

北城以北 提交于 2019-12-11 01:26:00
问题 When I try & start one of my services I get this error: There is no index named: RavenTimeoutPersistence/TimeoutDataSortedByTime Stacktrace: Unhandled Exception: Magnum.StateMachine.StateMachineException: Exception occurred in Topshelf.Internal.ServiceControlle r 1[[NServiceBus.Hosting.Windows.WindowsHost, NServiceBus.Host, Version=3.2.0.0, Culture=neutral, PublicKeyToken=9fc3864 79f8a226c]] during state Initial while handling OnStart ---> System.Exception: Exception when starting endpoint,

How to Load<T> a RavenDB Document, constrained to a Collection, when not using default ID generation strategy

核能气质少年 提交于 2019-12-11 00:31:52
问题 In RavenDB 4 (v4.0.3-patch-40031) I have two Document types: Apple and Orange . Both have similar, but also distinct, properties. I run into a bug in my code at runtime where sometimes an the ID of an Apple is provided, but an Orange is returned. Scary! Diving into it, it somewhat makes sense. But I'm struggling with an appropriate solution. Here goes. In RavenDB, I have stored a single Apple as a Document: id: "078ff39b-da50-4405-9615-86b0d185ba17" { "Name": "Elstar", "@metadata": { "

How do I find attachments in ravendb 3.5?

假装没事ソ 提交于 2019-12-11 00:07:33
问题 I'm currently debugging some code which is supposed to return an attachment for a given document, but no attachment is coming back. Raven studio indicates that there are attachments in the database - it shows me that a number of attachments exist - but I can't see, via the studio web UI, if a particular document has an attachment. Is there a way to query attachments via the studio UI? Also is there a way to tell if a document has an attachment via the studio UI? Online documentation don't

Why does storing a Nancy.DynamicDictionary in RavenDB only save the property-names and not the property-values?

纵饮孤独 提交于 2019-12-10 22:04:13
问题 I am trying to save (RavenDB build 960) the names and values of form data items passed into a Nancy Module via its built in Request.Form . If I save a straightforward instance of a dynamic object (with test properties and values) then everything works and both the property names and values are saved. However, if I use Nancy's Request.Form then only the dynamic property names are saved. I understand that I will have to deal with further issues to do with restoring the correct types when

Can Raven Db run on Winhost?

强颜欢笑 提交于 2019-12-10 21:07:52
问题 I'm trying to run Raven Db in embeddedmode on Winhost, but I get a securityexception with following stacktrace: System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31 System.Security.CodeAccessPermission.Demand() +46 System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties() +53 Raven.Database.Util.PortUtil.FindPort() in

Put Attempted on document using non current Etag error

血红的双手。 提交于 2019-12-10 19:18:25
问题 I am going through the popular Pro ASP.NET MVC 5 book and building the Sports Store application, but I am using RavenDb instead of Entity Framework. Initially, I created the Product records in Raven through the local API (not through code). I gave the records a manual Id and created the json fields and values for each product - 9 in total. I then wrote the parts of the application that loaded these products and everything worked totally fine. The data returned exactly as I expected every time

Raven query returns 0 results for collection contains

我怕爱的太早我们不能终老 提交于 2019-12-10 19:18:15
问题 I have a basic schema Post { Labels: [ { Text: "Mine" } { Text: "Incomplete" } ] } And I am querying raven, to ask for all posts with BOTH "Mine" and "Incomplete" labels. queryable.Where(candidate => candidate.Labels.Any(label => label.Text == "Mine")) .Where(candidate => candidate.Labels.Any(label => label.Text == "Incomplete")); This results in a raven query (from Raven server console) Query: (Labels,Text:Incomplete) AND (Labels,Text:Mine) Time: 3 ms Index: Temp/XWrlnFBeq8ENRd2SCCVqUQ==

Creating more like this in RavenDB

有些话、适合烂在心里 提交于 2019-12-10 18:58:06
问题 I have these documents in my domain: public class Article { public string Id { get; set; } // some other properties public IList<string> KeywordIds { get; set; } } public class Keyword { public string Id { get; set; } public string UrlName { get; set; } public string Title { get; set; } public string Tooltip { get; set; } public string Description { get; set; } } I have this scenario: Article A1 has keyword K1 Article A2 has keyword K1 One user reads article A1 I want to suggest user to read

Raven DB: How to create “UniqueVisitorCount by date” index

血红的双手。 提交于 2019-12-10 17:48:49
问题 I have an application to track the page visits for a website. Here's my model: public class VisitSession { public string SessionId { get; set; } public DateTime StartTime { get; set; } public string UniqueVisitorId { get; set; } public IList<PageVisit> PageVisits { get; set; } } When a visitor go to the website, a visit session starts. One visit session has many page visits. The tracker will write a UniqueVisitorId (GUID) cookie when the first time a visitor go to the website. So we are able