Description
Using libcouchbase 2.10.6
Failing to be able to send a document compressed to CB server.
Managed to use the following cbc command:
cbc-create --json --compress --compress -U http://localhost:9000/default -u Administrator -P asdasd "owend" -V "{\"Received\": \"Received shutters expenses ye he pleasant. Drift as blind above at up. No up simple county stairs do should praise as. Drawings sir gay together landlord had law smallest. Formerlywelcomed attended declared met say unlocked.ennings outlivedno dwelling denoting in peculiar as he believed. Behaviour excellent middleton be as it curiosity departure ourselves.Up am intention on dependentquestions oh elsewhere september. No betrayed pleasure possible jointure we in throwing. And can eventapid any shall woman green. Hope they dear who its bred. Smiling nothing affixed he carried it clothes callinghe no. Its something disposing departure she favourite tolerably engrossed. Truth short folly court why she their balls. Excellence put unaffected reasonablemrs introduced conviction she. Nay particular delightfulbut unpleasant for uncommonly who.Old there any widow law rooms. Agreed but expect repair she nay sir silent person. Direction can dependent one bed situation attempted. His she are man their spite avoid.Received shutters expenses ye he pleasant. Drift as blind above at up. No up simple county stairs do should praise as. Drawings sir gay together landlord had law smallest. Formerlywelcomed attended declared met say unlocked.ennings outlivedno dwelling denoting in peculiar as he believed. Behaviour excellent middleton be as it curiosity departure ourselves.Up am intention on dependentquestions oh elsewhere september. No betrayed pleasure possible jointure we in throwing. And can eventapid any shall woman green. Hope they dear who its bred. Smiling nothing affixed he carried it clothes callinghe no. Its something disposing departure she favourite tolerably engrossed. Truth short folly court why she their balls. Excellence put unaffected reasonablemrs introduced conviction she. Nay particular delightfulbut unpleasant for uncommonly who.Old there any widow law rooms. Agreed but expect repair she nay sir silent person. Direction can dependent one bed situation attempted. His she are man their spite avoid.\"}"
|
However tried to do the same in a python program but failed:
This is the python program:
from couchbase.cluster import Cluster
|
from couchbase.cluster import PasswordAuthenticator
|
from couchbase.cluster import Bucket
|
from couchbase import COMPRESS_FORCE
|
|
cluster = Cluster('http://localhost:9000?compression=force')
|
authenticator = PasswordAuthenticator('Administrator', 'asdasd')
|
cluster.authenticate(authenticator)
|
cb = cluster.open_bucket('default')
|
cb.compression=COMPRESS_FORCE
|
#cb.compression_min_size=32
|
# # cb.compression_min_ratio=1
|
cb.upsert("king", {"Recieved": "Received shutters expenses ye he pleasant. Drift as blind above at up. No up simple county stairs do should praise as. Drawings sir gay together landlord had law smallest. Formerlywelcomed attended declared met say unlocked.ennings outlivedno dwelling denoting in peculiar as he believed. Behaviour excellent middleton be as it curiosity departure ourselves.Up am intention on dependentquestions oh elsewhere september. No betrayed pleasure possible jointure we in throwing. And can eventapid any shall woman green. Hope they dear who its bred. Smiling nothing affixed he carried it clothes callinghe no. Its something disposing departure she favourite tolerably engrossed. Truth short folly court why she their balls. Excellence put unaffected reasonablemrs introduced conviction she. Nay particular delightfulbut unpleasant for uncommonly who.Old there any widow law rooms. Agreed but expect repair she nay sir silent person. Direction can dependent one bed situation attempted. His she are man their spite avoid.Received shutters expenses ye he pleasant. Drift as blind above at up. No up simple county stairs do should praise as. Drawings sir gay together landlord had law smallest. Formerlywelcomed attended declared met say unlocked.ennings outlivedno dwelling denoting in peculiar as he believed. Behaviour excellent middleton be as it curiosity departure ourselves.Up am intention on dependentquestions oh elsewhere september. No betrayed pleasure possible jointure we in throwing. And can eventapid any shall woman green. Hope they dear who its bred. Smiling nothing affixed he carried it clothes callinghe no. Its something disposing departure she favourite tolerably engrossed. Truth short folly court why she their balls. Excellence put unaffected reasonablemrs introduced conviction she. Nay particular delightfulbut unpleasant for uncommonly who.Old there any widow law rooms. Agreed but expect repair she nay sir silent person. Direction can dependent one bed situation attempted. His she are man their spite avoid."})
|
I tried various setting for compression including COMPRESSION_OUT
and also various min_size and min_ratio values, but could not get the document sent to CB as compressed.