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
1
vote
1 answer

What does Retry mean in context of Java Couchbase SDK?

I am using Java couchbase sdk in my application. While setting up the DefaultCouchbaseEnvironment, I came across the property RetryStrategy. Now I am using the default configuration for which the retry strategy is BestEffortRetryStrategy. According…
Kunal gupta
  • 481
  • 2
  • 7
  • 19
1
vote
0 answers

Exception in thread "main" com.couchbase.client.core.config.ConfigurationException: Could not open bucket

I am getting below error while working with Couchbase enterprise java client. Exception in thread "main" com.couchbase.client.core.config.ConfigurationException: Could not open bucket. at…
Lokesh G
  • 21
  • 1
  • 2
1
vote
1 answer

How to increase timeout for waiting for the couchbase Query service to come up

I am running couchbase in a testcontainer (using docker) and it is timing out waiting for the Query service to come up. How do I increase the timeout from 120 seconds? 2020-01-23 19:19:43,026 INFO chbase.CouchbaseQueryServiceWaitStrategy: 33 -…
1
vote
0 answers

Unsupported type for JsonArray: class java.util.LinkedHashMap

Updating a subobject with Spring Data for Couchbase I do this query in the Couchbase console and it is working fine UPDATE `dev_h` USE KEYS "12" SET _data.payload = { "name": "new_name", "language": "new_language"} I want to translate the query in…
1
vote
1 answer

No converter found capable of converting from type [java.util.LinkedHashMap] to type

I have documents like this in a couchbase DB { "hostel": { "city": {} ... } } and I have this query defined in a repository @Query("UPDATE #{#n1ql.bucket} SET hostel.state = $2 where hostel.id=$1 RETURNING #{#n1ql.bucket}.hostel …
1
vote
0 answers

CouchbaseException: INVALID_ARGUMENTS when using a counter

I have a springBoot 2.1.9.RELEASE application that uses Spring Data for Couchbase But when I use the Atomic counters in Couchbase to Increment a counter with 1 bucket.counter(doc.getId(), 1); I got an exception…
1
vote
1 answer

Spring Data for Couchbase - increments the numerical value of special counter document

I want to increments the numerical value of special counter document, Obtain the id from counter document and increment it com.couchbase.client.java.Bucket bucket; JsonLongDocument joCounter = bucket.counter(docKey, 1); but I don't know how to…
1
vote
1 answer

Spring Data for Couchbase - Metadata Information

I am new using Spring Data for Couchbase, I defined this object public class Building { @NotNull @Id private String id; @NotNull @Field private String name; @NotNull @Field private String companyId; } but I am…
1
vote
1 answer

How to use Couchbase Java SDK to modify a document in a bucket without changing its "expiration" value?

I have to modify a document in the Couchbase bucket using the Java SDK (currently it is a Java client in version 2.7.7 however, this can be changed if necessary) without changing its “expiration” value. There are no indexes in the bucket, and N1QL…
Tomasz
  • 91
  • 1
  • 5
1
vote
1 answer

Couch Base Configuration Using REST APIs

I am trying to do auto configuration of CouchBase: Cluster Admin User Bucket Bucket User Services for couch base (data,kv,n1ql,index,fts,search) Using the rest api everything goes well but i can see while doing the manual configuration i can see…
Rohitesh
  • 1,514
  • 7
  • 28
  • 51
1
vote
0 answers

How do I sort by datetype using SearchQuery/full text search in Couchbase?

I have configured and indexed receivedDate. It looks like receivedDate:"2019-02-130 01:01:01 PM" in my database. How do I sort using date type text or date type instance? Here are configured fields(Assume there is not any typo in case…
1
vote
1 answer

replace spring couchbaseTemplate object with new cluster,Bucket object without affecting transactions or restarting application

I want to replace a spring couchbaseTemplate object which is generated on startup by custom Bucket object( where username is <> bucketName) and Cluster object.I am able to create and make the application running.CouchbaseTemplate is also getting…
1
vote
1 answer

How to sort desc/asc in full text search index of couchbase

I have this query to execute from my application against a full text search couchbase index : BooleanQuery booleanQuery = buildQuery(params); SearchQuery searchQuery = new SearchQuery( "index_name", …
Lho Ben
  • 2,053
  • 18
  • 35
1
vote
0 answers

Couchbase counter giving NOT_EXISTS error

Following is the code to update counter. kvList contains List[(key, value to add)] def counter(kvList: List[(String, Long)]) = { try {`enter code here` if (kvList!=null && kvList.nonEmpty) { Observable.from(kvList).flatMap(kv => { val…
KaliCharan
  • 1,215
  • 2
  • 8
  • 12
1
vote
1 answer

Couchbase 2.5 SDK Java meta type issue

With Couchbase 1.4 SDK version, json datas are inserted with the meta type as json and non-json datas are inserted with the meta type as base64. Couchbase 1.4 SDK Code: OperationFuture setOp = client.set(_key, expiry, value); Now we…
Ismail
  • 65
  • 7