Questions tagged [couchbase-java-api]

The Couchbase Java SDK provides API to working with JSON documents using the Data, N1QL Query, Full-Text Search, Analytics Query and Views Queries available from Couchbase Server.

This Java native client library also has an RxJava based asynchronous API, has built in metrics exposed through an event bus API.

Resources:

172 questions
9
votes
2 answers

Sync and delete removed documents from CouchDB and Couchbase-lite

I'm currently using couchbase-lite inside my iOS and android application to sync down files from a database running CouchDB. Every so often I remove files that are not longer needed, and I would like the same files to be removed from the mobile app…
9
votes
3 answers

scala observable unify observable with a sequence without intermediate datastructure update

I have a code which calls couchbase for getting some rows as following: val gotValues: Observable[JsonDocument] = Observable.from(rowKeys).flatMap(id => couchbaseBucket.async().get(id)) If I have 1,2,3,4,5,6 as input row-keys and only rows…
Jas
  • 14,493
  • 27
  • 97
  • 148
5
votes
1 answer

Couchbase in docker for integration tests: Make the ports 8092, 8093, 8094 and 8095 configurable to be able to use docker’s random ports

I am using Couchbase java client SDK 2.7.9 and am running into a problem while trying to run automated integration tests. In such test we usually use random ports to be able to run the same thing on the same Jenkins slave (using docker for…
Arnaud Villevieille
  • 1,039
  • 2
  • 10
  • 24
5
votes
2 answers

Couchbase : How to maintain arrays without duplicate elements?

We have a Couchbase store which has the Customer data. Each customer has exactly one document in this bucket. Daily transactions will result in making updates to this customer data. Sample document. Let's focus on the purchased_product_ids…
ramu
  • 1,415
  • 1
  • 13
  • 12
5
votes
2 answers

Couchbase uses wrong indexes with N1QL parameterized queries

I have problems with understanding of way couchbase query plan works. I use SpringData with Couchbase 4.1 and I provide custom implementation of Couchbase Repository. Inside my custom implememtnation of Couchbase Repository I have below…
5
votes
3 answers

MongoDB vs Couchbase performance on single node

I am doing POC on document data store so for that I have selected MongoDB and CouchBase for evaluation. Environment Detail is as below Machine : Centos 6.7, 2 core cpu, CPU MHz: 2494.078, RAM : 7 GB (6 GB Free) MongoDB db version v3.2.0 with default…
Vipul
  • 816
  • 4
  • 11
  • 26
4
votes
1 answer

Spring-boot Couchbase filter by attribute throwing IndexOutOfBoundsException

When I am trying to read entire bucket by findAll(Pageable) works fine. When I try to filter paged read - findByUserId (find by userId) - getting java.lang.IndexOutOfBoundsException. filtering documented…
4
votes
1 answer

Couchbase Analytics Java SDK connection creation + Security Roles

I am using the Couchbase Java SDK to query a couchbase analytics service. The process is covered in this tutorial: https://docs.couchbase.com/java-sdk/2.7/analytics-using-sdk.html The Java SDK provides a Bucket object as the means of accessing…
robjwilkins
  • 5,462
  • 5
  • 43
  • 59
4
votes
1 answer

Couchbase parameterized query with numeric values

I'm trying to add numeric values to parameterized AnalyticsQuery but keep getting errors when the query runs. The java creating the query looks like this: private ParameterizedAnalyticsQuery aggregateQuery(String userId, Long from, Long to) { …
robjwilkins
  • 5,462
  • 5
  • 43
  • 59
4
votes
0 answers

java.lang.IllegalStateException: The content of this Observable is already released

I am using Spring web flux + Reactive Couchbase 6.0. After deploying my code, I am getting below two errors off and on. First Error: [QueryEndpoint]: Got error while consuming KeepAliveResponse. java.util.concurrent.TimeoutException: null at…
Bifrost
  • 417
  • 5
  • 23
4
votes
0 answers

Subscribe to long running async query

I am trying to fetch a large dataset from Couchbase reactively. I use the ReactiveCouchbaseRepository provided by spring data. public interface ReactiveFooRepository extends ReactiveCouchbaseRepository { …
4
votes
2 answers

What is Couchbase Environment autoreleaseAfter option?

After using a bit of the java client API of Couchbase (2.4.1) I ran into this exception: Error in scheduled task java.lang.IllegalStateException: The Content of this Observable is already released. Subscribe earlier or tune the…
zenbeni
  • 7,019
  • 3
  • 29
  • 60
4
votes
2 answers

Issue when trying to connect to the cluster after updating the version of Java SDK

We are experiencing the issue when trying to connect to the cluster after updating the version of Java SDK. The setup of the system is as follows: We have a web application that is using Java SDK and a Couchbase cluster. In between we have a VIP…
3
votes
0 answers

Accessing Couchbase Transaction response outside lambda

I am trying to use java sdk (java-client v3.4.3). Since I need transactions, I am using transactional flavor of cluster object cluster.reactive().transactions().run((ctx) -> {}); Both sync/ async versions expect lambda and return TransactionResult…
uzumas
  • 632
  • 1
  • 8
  • 23
3
votes
1 answer

cbimport not importing file which is extracted from cbq command

I tried to extract data from below cbq command which was successful. cbq -u Administrator -p Administrator -e "http://localhost:8093" --script= SELECT * FROM `sample` where customer.id=="12345'" -q | jq '.results' > temp.json; However when I am…
sagar verma
  • 404
  • 4
  • 10
1
2 3
11 12