ravendb

Problems with RavenDB.Client reference in asp.net 5.0 project.json

坚强是说给别人听的谎言 提交于 2019-11-28 09:04:10
问题 I'm trying to build a RavenApiController with the new ASP.NET 5.0 (aka Asp.Net vNext) stuff and can't seem to get the RavenDB.Client references to work at all. The error I get is Error CS0246 The type or namespace name 'Raven' could not be found (are you missing a using directive or an assembly reference?) SharedIO.ASP.NET Core 5.0 RavenApiController.cs 3 My project.json is as follows { "webroot": "wwwroot", "version": "1.0.0-*", "exclude": [ "wwwroot" ], "packExclude": [ "**.kproj", "**.user

How to disable RavenDB replication

半世苍凉 提交于 2019-11-28 03:21:55
问题 How do I disable RavenDB replication? The reason for that is I have a simple database on one server and I don't need any replication at this point. IDocumentStore tmpStore = new DocumentStore { Url = url }; tmpStore.Initialize(); tmpStore.DatabaseCommands.EnsureDatabaseExists(dbName); // WebException If I try to ensure that database was created I get a WebException with HTTP status 404. This error occurred when RavenDB makes request to /docs/Raven/Replication/Destinations . Or shall I just

Unit Testing RavenDB

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 17:10:48
问题 In my unit tests I am setting up each test to have a totally empty IDocumentSession. I do it like this: [SetUp] public void SetUp() { _store = new EmbeddableDocumentStore { RunInMemory = true }; _store.Initialize(); Session = _store.OpenSession(); } But I think this might be the reason my tests are a little slow. I was wondering if there is a simple command to delete all documents from the database. What I want is to know is: if I can do this, and if it would improve performance. 回答1: This is

RavenDB fast substring search

落爺英雄遲暮 提交于 2019-11-27 16:56:39
问题 I have perhaps trillions of string sequences. I'm looking for a fast substring search. I've created an index. When I am trying to get some results( x => x.StartWith ), it takes about 2 sec on a 3 million object database. How much time it might take on 500 million objects? Is it possible to have RavenDB search faster? store.DatabaseCommands.PutIndex("KeyPhraseInfoByWord", new Raven.Client.Indexes.IndexDefinitionBuilder<KeyPhraseInfo> { Map = wordStats => from keyPhraseInfo in

How can I run RavenDB in a shared hosting environment?

不羁的心 提交于 2019-11-27 10:51:15
问题 RavenDB has the ability to run in 'embedded' mode, which as far as I understand, should allow it to be run in a shared hosting environment. Does anyone have any idea how it would work in an ASP.NET MVC application, and what the best practice for doing it would be? Are there any dependencies in the hosting environment that I need to be aware of? 回答1: Yes. I have RavenDB running in a shared hosting environment, http://www.winhost.com/, using ASP.NET MVC 3 and RavenDB 1.0.0.371 which was

Is it possible to connect to an embedded DB with Raven Management Studio

你。 提交于 2019-11-27 07:35:53
问题 I'm playing with Raven DB and am wondering if it's possible to connect to an embedded DB with Raven Management Studio. Has anyone ever done this? 回答1: If I understood you correct and you mean the Web UI, you simply have to enable the embedded web server. var documentStore = new EmbeddableDocumentStore { DataDirectory = "Data", UseEmbeddedHttpServer = true }; See http://ravendb.net/docs/server/deployment/embedded Also make sure to include Raven.Studio.xap in the root of your web application 来源