couchbase

couchbase reduce by date in node.js

旧城冷巷雨未停 提交于 2019-12-24 03:26:58
问题 I have to make some code which filter active user with couchbase, node.js I have some users documents, and I made a view with the following coded : I made a view called "bydate" with the following code : function (doc, meta) { if(meta.type == 'json') { if(doc.type == 'user') { if (doc.lastUpdate){ emit(dateToArray(doc.lastUpdate),doc.name); } } } } I have to filter by day, month or year using the "group_level" setting in couchbase console , however I have unable to filter it properly on node

retrieving all records(documents) of Couchbase

杀马特。学长 韩版系。学妹 提交于 2019-12-24 01:53:50
问题 I am using node.js and looking for a way to get all documents of a specific bucket of couchbase. Is there any solution without having a loop and incremental index ? I know I can make an atomic key and later on using it via a loop to retrieve all data.But I need a function which returns all documents. Is there any function which 'at least' return me the number of documents already exist in bucket? 回答1: I've had this question before me as well, as per Couchbase engineering team its not possible

Why Couchbase round numeric values in a json Document?

感情迁移 提交于 2019-12-24 01:42:44
问题 Is there anyone who had noted that Couchbase changes the numerical value of a property, over a certain limit, when recording a Json document? Here is an example. For this test, I use the live input via the couchbase web interface. The property "inputValue" corresponds to the value entered in the property "valueAfterSave" before clicking the save button. The property "valueAfterSave" corresponds to the value after the save. To a number with 16 digits, it's good: { "inputValue":

Couchbase: python SDK “uppend”

霸气de小男生 提交于 2019-12-24 00:44:27
问题 I want to do an "uppend_multi": an append_multi (http://pythonhosted.org/couchbase/api/couchbase.html#couchbase.bucket.Bucket.append_multi) where some of the keys may not exist. If they do not already exist then the append operation should be an insert. How can I do this? Nothing in the API docs suggests this is supported, but I imagine it is a very common operation. Right now I am doing this, but it seems so natural of a thing to need to do that I highly doubt this is the best way to do it:

how to access Couchbase server (on windows 7) by a remote app .net

醉酒当歌 提交于 2019-12-23 23:18:51
问题 i have installed couchbase server on windows 7. i created a small c# .net app which communicate with it, on my local machine. i am trying to create an app that would do just that but from a remote computer. (connect to the couchbase on my computer from a remote computer) in app.config i add //add uri="http://192.168.0.100:8091/pools"/ im behind a router (big difference?) what do i need to change or do, to be able to connect from a remote pc? answers or links will be appreciated, including

_class field and spring data couchbase

巧了我就是萌 提交于 2019-12-23 22:01:06
问题 So, I was trying to find a way to remove/rename( and change the fields value ) the _class field from the document generated by spring data couchbase as the document is going to be stored by one service and in all likeliness be consumed by someone totally different. I was playing around with the api for spring couchbase and through a bit of trial and error found that I can rename the _class field with a custom value using the following way -> 1) Override the typeKey method in a class

_class field and spring data couchbase

风格不统一 提交于 2019-12-23 21:20:58
问题 So, I was trying to find a way to remove/rename( and change the fields value ) the _class field from the document generated by spring data couchbase as the document is going to be stored by one service and in all likeliness be consumed by someone totally different. I was playing around with the api for spring couchbase and through a bit of trial and error found that I can rename the _class field with a custom value using the following way -> 1) Override the typeKey method in a class

how to get all keys from couchbase?

家住魔仙堡 提交于 2019-12-23 21:14:45
问题 i use python language to get all keys from couchbase, the following is my code; function(doc, meta){ emit(null, meta.id); } this is view in "namedb" bucket; from couchbase import Couchbase db = Couchbase.connect(bucket="namedb", host="192.168.1.170", port=8091) name = 'key' view = 'all' skip=0 limit = 10000 fd = open("name.txt", "a", 0) num = 1000000 while skip < num: result = db.query(name, view, use_devmode = False, limit = limit, skip = skip) for row in result: fd.write(row.value + '\n')

Issues when replicating from couchbase bucket to elasticsearch index?

£可爱£侵袭症+ 提交于 2019-12-23 20:11:34
问题 This issue seems to be related to using the XDCR in couchbase. If I had the following simple objects 1: { "name" : "Mark", "age" : 30} 2: { "name" : "Bill", "age" : "forty"} and set up an elasticsearch index as such curl -XPUT 'http://localhost:9200/test/couchbaseDocument/_mapping' -d ' { "couchbaseDocument" : { "dynamic_templates": [ { "store_generic": { "match": "*", "mapping": { "store": "yes" } } } ] } }' I can then add the two objects to this index using the REST API curl -XPUT localhost

Couchbase/hadoop connector: sqoop job FAILED “Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected”

泪湿孤枕 提交于 2019-12-23 19:02:04
问题 My Configuration: CouchBase server 2.0 Sqoop 1.4.2 (compile for hadoop version 2.0.0) Stack Hadoop CDH4.1.2 I want to use the CouchBase/Hadoop connector (http://www.couchbase.com/develop/connectors/hadoop), but when I launch an import I have the following error: sqoop-import --connect http://localhost:8091/pools --table DUMP 13/01/07 11:00:34 INFO tool.CodeGenTool: Beginning code generation 13/01/07 11:00:34 INFO orm.CompilationManager: HADOOP_HOME is /usr/lib/hadoop Note: /tmp/sqoop-agent