Am I compressing?


(Mohamed Lrhazi) #1

in Search head, my cluster status shows:
{
state: open
settings: {
index.compress: true
index.number_of_replicas: 1
index.number_of_shards: 12
index.refresh_interval: 10s
index.version.created: 190999
}

The index was created like so:
conn.create_index_if_missing(index_name,settings={'compress':
'true',"number_of_shards" : 12,"number_of_replicas" : 1,"refresh_interval"
: "10s",})

Is it the case that all stored fields are now compressed? or do I need to
specify compression option at the fields/mapping level as well?

Thanks a lot,
Mohamed.

--


(simonw-2) #2

hey,

see http://www.elasticsearch.org/guide/reference/index-modules/store.html
(Store Level Compression)

you should use index.store.compress.stored

for this or you if you only want to compress the _source field you need to
enable that in the mapping. Yet, store level compression has better
compression compared to _source.

simon
On Friday, October 12, 2012 2:39:16 PM UTC+2, Mohamed Lrhazi wrote:

in Search head, my cluster status shows:
{
state: open
settings: {
index.compress: true
index.number_of_replicas: 1
index.number_of_shards: 12
index.refresh_interval: 10s
index.version.created: 190999
}

The index was created like so:
conn.create_index_if_missing(index_name,settings={'compress':
'true',"number_of_shards" : 12,"number_of_replicas" : 1,"refresh_interval"
: "10s",})

Is it the case that all stored fields are now compressed? or do I need to
specify compression option at the fields/mapping level as well?

Thanks a lot,
Mohamed.

--


(Mohamed Lrhazi) #3

Cool thanks a lot. do I still need the first level "compress" field in my
index creation settings, or is that redundant now?

settings={
'compress': 'true',
"number_of_shards" : 12,
"number_of_replicas" : 1,
"refresh_interval" : "10s",
"store": {"compress": {"stored": 'true',"tv": 'true'},},
}

On Friday, October 12, 2012 11:43:52 AM UTC-4, simonw wrote:

hey,

see http://www.elasticsearch.org/guide/reference/index-modules/store.html(Store Level Compression)

you should use index.store.compress.stored

for this or you if you only want to compress the _source field you need to
enable that in the mapping. Yet, store level compression has better
compression compared to _source.

simon
On Friday, October 12, 2012 2:39:16 PM UTC+2, Mohamed Lrhazi wrote:

in Search head, my cluster status shows:
{
state: open
settings: {
index.compress: true
index.number_of_replicas: 1
index.number_of_shards: 12
index.refresh_interval: 10s
index.version.created: 190999
}

The index was created like so:
conn.create_index_if_missing(index_name,settings={'compress':
'true',"number_of_shards" : 12,"number_of_replicas" : 1,"refresh_interval"
: "10s",})

Is it the case that all stored fields are now compressed? or do I need to
specify compression option at the fields/mapping level as well?

Thanks a lot,
Mohamed.

--


(system) #4