couchbase

pyinstaller: _libcouchbase module not found after building the executable

夙愿已清 提交于 2019-12-24 18:30:24
问题 I have a simple python script that imports couchbase module on Ubuntu 14.04: $ cat test.py from couchbase import Couchbase print 'module _libcouchbase found' Running from interpreter works fine: $ python test.py module _libcouchbase found Created an executable: $ pyinstaller test.py Running the executable throws an error of unable to import _libcouchbase module: $ ./dist/test/test Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/local/lib/python2.7/dist

Couchbase document id generation

做~自己de王妃 提交于 2019-12-24 17:26:16
问题 I have an Springboot application integrated with couchbase 6.0. I have read that if a key is annotated with @Id then it will saved as an document id and will not be a part of the json. Then i have used @Id and @Field together on the key but still that field is not appearing on json document. Can somebody help me out on the following: 1: How to make same key as document id and keep that a part of json also. 2: If a field is declared with @Id, it is created as document id and does not appear on

Using N1QL with document keys

佐手、 提交于 2019-12-24 16:12:04
问题 I'm fairly new to couchbase and have tried to find the answer to a particular query I'm trying to create with not much success so far. I've debated between using a view or N1QL for this particular case and settled with N1QL but haven't managed to get it to work so maybe a view is better after all. Basically I have the document key (Group_1) for the following document: Group_1 { "cbType": "group", "ID": 1, "Name": "Group Atlas 3", "StoreList": [ 2, 4, 6 ] } I also have 'store' documents, their

Query multiple keys in couchbase lite view

↘锁芯ラ 提交于 2019-12-24 13:26:40
问题 Hi I am new to couchbase/couchbase-lite and i try to query a view with multiple keys without success. Her is how the map function looks: public void map(Map<String, Object> doc, Emitter emitter) { if (doc.get("type").equals("my_type") { List<Object> keys = new ArrayList<Object>(); keys.add(doc.get("key_1")); keys.add(doc.get("key_2")); emitter.emit(keys, null); } } My problem is that i need to query the view either only with key_1 or with a combination of key_1 and key_2 like so List<Object>

Couchbase view index update hanging after adding file over ~1.4mb

亡梦爱人 提交于 2019-12-24 12:45:16
问题 I'm using the latest Couchbase .Net SDK and I'm having problems with larger JSON-documents (over 1.4mb) in views. In the case these documents were there when the design doc was added, the large files are just not shown in the view results (amount of documents given by view is smaller than actual amount). If I add these larger files (using .Net client) later on, after design doc is created in the bucket, and getting the view with stale=false, the updating of the index never finishes and the

Couchbase custom reduce function

北城以北 提交于 2019-12-24 12:29:42
问题 I have some documents in my Couchbase with the following template: { "id": 102750, "status": 5, "updatedAt": "2014-09-10T10:50:39.297Z", "points1": 1, "points2": -3, "user1": { "id": 26522, ... }, "user2": { "id": 38383, ... }, .... } What I want to do is to group the documents on the user and sum the points for each user and then show the top 100 users in the last week. I have been circling around but I haven't come with any solution. I have started with the following map function: function

Filtering posts by timestamp and userId

佐手、 提交于 2019-12-24 08:18:34
问题 I have the following object in Couchbase: { "postReplyId": "Reply_9AE1F47E585522FD1D2EFFEA7671C0855BBFDA991698B23886E37D1C65DAC8AF_1375468399745", "userId": "User_9AE1F47E585522FD1D2EFFEA7671C0855BBFDA991698B23886E37D1C65DAC8AF", "postId": "Message_9AE1F47E585522FD1D2EFFEA7671C0855BBFDA991698B23886E37D1C65DAC8AF_1375457606125", "post_reply_message": "Testing", "attachments": { "images": [ ], "audio": [ ], "videos": [ ] }, "upVoters": [ ], "downVoters": [ ], "upVotes": 0, "report": 0,

SpringBoot Couchbase Integration

为君一笑 提交于 2019-12-24 06:48:49
问题 I want to make a filterable list of my UserTask entity with the QueryDslPredicateExecutor interface, so the parameters given in the query string will be autoprocessed into a Predicate. I have the following classes/interfaces public interface UserTaskQuerydslRepository extends CrudRepository<UserTask, String>, QueryDslPredicateExecutor<UserTask>, QuerydslBinderCustomizer<QUserTask> { @Override default void customize(QuerydslBindings bindings, QUserTask userTask) { ... } } UserTask is my class

Spring CrudRepository query with child element?

自作多情 提交于 2019-12-24 06:47:41
问题 i have couchbase document like following { "contentTimestamp": 1470216079085, "version": 12, "content": [ { "text": "ABC", "params": { "TYPE": "TEXT" } } ], "readers": { "u_id_1": 0, "u_id_2": 0, }, "contributors": [ { "id": "u_id_1" } ] } Document class @Document public class ContentDoc implements Serializable{ private static final long serialVersionUID = 1L; @Id private String id; @Field private Integer version = 12; @Field private List<Content> content = new ArrayList<>(); @Field private

Using IN clause in couchbase N1Ql @query or use findAll(keys) from couchbase JPA

点点圈 提交于 2019-12-24 06:30:51
问题 I am using Spring couchbase JPA and trying to fetch documents by giving a list of keys. My repository structure looks something like public interface EmployeeRepo extends CouchbasePagingAndSortingRepository<Employee, String>, EmployeeCustomRepo { I have a list of employee ids to search for and fetch the corresponding document. I tried using the method from curdRepository public List<Employee> findAllById(List<String> empIds) { return employeeRepo.findAll(empIds); } But I get exception as::