Is local documents working with phonegap couchbase lite?

As per https://developer.couchbase.com/documentation/mobile/1.1.0/develop/references/couchbase-lite/rest-api/local-document/put---db--local--local-doc-/index.html I am using local documents

but id as “_local/identified” not working to while getting document… getting 404

GET {ulr}/db/dbatabasename/_local/123

This document included in 1.1 version is it still supporting or deprecated.

Indeed, the local document endpoints are missing from the latest doc set https://developer.couchbase.com/documentation/mobile/1.4/references/couchbase-lite/rest-api/index.html

But the feature is still there and supported, is it returning a 404 on iOS and Android?

yes returning 404… .

As am using phonegap plugin I hope it doesn’t matter platform but any way my scenariod is Android.

But interseting part is while am doing PUT request getting success with {“rev”:“1-local”,“id”:"_local/taa-25381",“ok”:true} as body resonse.

@jamiltz: it is working now… if I add attribute as _local not working… after renamed attribute as isLocal it started working thank you…

But _all_docs not returning local documents also views also not working with local documents.

Local documents can only be retrieved by their ID and are usually used to store application configuration data.

Alternatively to local documents, you can create another database and persist the same data there. That second database wouldn’t synchronize with the server and that way you also have the full query API available (map/reduce). I think this is an approach we need to recommend in the docs as it can be preferable to using local documents in some cases.

At least is there any way to get local documents count count?

No there isn’t. But that would be possible if they got stored as documents in a second database.

1 Like

Ok Thank you… Looks I may need to go with second database only… Thank you for your quick response and support…