2

After update the project to Spring Data Couchbase 4, the annotation N1qlPrimaryIndexed appears as deprecated,

@Repository
@N1qlPrimaryIndexed
public interface HostelRepository extends CouchbaseRepository<Hostel, String> {
}

I would like to know if there is a replacement for it

Sandro Rey
  • 2,429
  • 13
  • 36
  • 80

1 Answers1

1

Ideally, you should not be using @N1qlPrimaryIndexed in production, as it creates under-optimized indexes. As long as you have at least one index per document type, you should fine without it.

On Spring Dara Couchabse 4, we have a new set of annotations for indexing.

https://docs.spring.io/spring-data/couchbase/docs/current/reference/html/#couchbase.repository.indexing

deniswsrosa
  • 2,421
  • 1
  • 17
  • 25