couchbase

Couchbase multiple buckets in .NET app.config

末鹿安然 提交于 2019-11-29 11:41:56
Couchbase .Net manual says that I can configure my client in this way: <couchbase><servers bucket="default" bucketPassword=""> <add uri="http://192.168.0.2:8091/pools/default"/> <add uri="http://192.168.0.3:8091/pools/default"/> </servers></couchbase> Is there any way to define sevral buckets in app.config and then switch between them in my app? According to John's suggestion, I used such configuration: <configuration> <configSections> <sectionGroup name="couchbase"> <section name="bucket-1" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/> ... <section name="bucket-N" type=

Elastic Search-Search string having spaces and special characters in it using C#

孤者浪人 提交于 2019-11-29 10:50:55
I am looking for ElasticSearch nest query which will provide exact match on string having spaces in it using C#. for example - I want to search for a word like 'XYZ Company Solutions'. I tried querystring query but it gives me all the records irrespective of search result. Also i read on the post and found that we have to add some mappings for the field. I tried 'Not_Analyzed' analyzer on the field but still it does not worked. Here is my code of C# var indexDefinition = new RootObjectMapping { Properties = new Dictionary<PropertyNameMarker, IElasticType>(), Name = elastic_newindexname }; var

Is Cassandra a Key value store or wide column store?

主宰稳场 提交于 2019-11-29 07:28:04
I'm preparing a course on NoSQL for database novices. Did a lot of research online and now, I'm in a dilemma as to categorize Cassandra as a Wide Column Store or a Key Value Store? Or shall I call it a two dimensional Key Value Store? I'm having the same issue with CouchBase. Is it a Key Value store or a Document Store? I'm looking for a Solid way to categorize NoSQL Databases in their versions in 2015. Any help is appreciated. Since there is a Couchbase answer I'll jump-in on the Cassandra side. From the Cassandra GitHub page : Cassandra is a partitioned row store. Rows are organized into

NodeJS + Socket.IO 消息推送

我是研究僧i 提交于 2019-11-29 02:26:57
//socket.io var app = require("express")(); var http = require("http").Server(app); var io = require("socket.io")(http); //couchbase var couchbase = require("couchbase"); var cluster = new couchbase.Cluster("couchbase://192.168.1.1"); var bucket = cluster.openBucket("name","pass"); var onlineUsers = {}; var onlineCount = 0; io.on("connection" , function(socket){ socket.on("login" , function(obj){ socket.name = obj.userid; console.log(new Date() + " : 编号" + obj.userid + "员工已登录!"); if(!onlineUsers.hasOwnProperty(obj.userid)){ //onlineUsers[obj.userid] = obj.userid; onlineUsers[obj.userid] = {'c

Couchbase 2.2.0 document size editing limit

≯℡__Kan透↙ 提交于 2019-11-28 17:28:25
问题 I tried to edit document via couchbase console, and caught this warning message: Warning: Editing of document with size more than 2.5kb is not allowed How can I increase max editing document size? 回答1: You can raise the limit or disable completely on version 2.2: To raise the limit ; edit file: /opt/couchbase/lib/ns_server/erlang/lib/ns_server/priv/public/js/documents.js at line 214: var DocumentsSection = { docsLimit: 1000, docBytesLimit: 2500, init: function () { var self = this; Edit the

No mapping metadata found for java.lang.Object - Couchbase

爷,独闯天下 提交于 2019-11-28 14:40:42
I'm persisting an entity in a CouchBase repository and trying to query it. The entity looks like this: @Document(expiry = 0) public class GsJsonStore implements Serializable { private static final long serialVersionUID = 7133072282172062535L; @Id @GeneratedValue(strategy=GenerationType.AUTO) private long id; @Field private Map<String,Object> _object; @Field private String _subject; @Field private String _predicate; //Getters and Setters } I'm querying the entity by using N1QL queries on the CouchbaseOperations template like this: String query1 = "SELECT META(default).id as _ID, META(default)

Cannot inherit from final class error

与世无争的帅哥 提交于 2019-11-28 12:11:40
What does this error mean .. It runs fine in Eclipse but not in intellij idea Exception in thread "main" java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at

N1ql -> IN operator does not work with other conditions

本秂侑毒 提交于 2019-11-28 08:12:14
问题 The following query works just fine when only IN operator is used SELECT META().id FROM bucket_name WHERE description IN ['Item1','Item2'] But when I fire this query it gives me a blank result SELECT META().id FROM bucket_name WHERE id = 123 AND description IN ['Item1','Item2'] Am I doing something wrong or somebody else has faced the same problem? 回答1: I think you have to take your "IN" condition into parenthesis to make it work: SELECT META().id FROM bucket_name WHERE id = 123 AND

Couchbase multiple buckets in .NET app.config

喜欢而已 提交于 2019-11-28 05:50:41
问题 Couchbase .Net manual says that I can configure my client in this way: <couchbase><servers bucket="default" bucketPassword=""> <add uri="http://192.168.0.2:8091/pools/default"/> <add uri="http://192.168.0.3:8091/pools/default"/> </servers></couchbase> Is there any way to define sevral buckets in app.config and then switch between them in my app? 回答1: According to John's suggestion, I used such configuration: <configuration> <configSections> <sectionGroup name="couchbase"> <section name=

Elastic Search-Search string having spaces and special characters in it using C#

丶灬走出姿态 提交于 2019-11-28 04:37:22
问题 I am looking for ElasticSearch nest query which will provide exact match on string having spaces in it using C#. for example - I want to search for a word like 'XYZ Company Solutions'. I tried querystring query but it gives me all the records irrespective of search result. Also i read on the post and found that we have to add some mappings for the field. I tried 'Not_Analyzed' analyzer on the field but still it does not worked. Here is my code of C# var indexDefinition = new RootObjectMapping