Making Source Compression on by default at index creation time without explicit mappings

IIUC, _source compression is available, but off by default, and it can be
turned on at either index creation, or by changing the mappings. However
IIUC as well, the compression setting needs to be set per-index-type?

Reading the index creation, as well as the mapping docs, there doesn't seem
to be a way to set compression to be on by default for all types that
appear, one would have to define it to be on for the expected types.

Would it seem (even) more useful to have a per-index top level setting to
make compression on by default rather than need to explicitly set it
per-type in the mappings?

cheers,

Paul

Hi Paul

On Thu, 2012-05-03 at 11:12 +1000, Paul Smith wrote:

IIUC, _source compression is available, but off by default, and it can
be turned on at either index creation, or by changing the mappings.
However IIUC as well, the compression setting needs to be set
per-index-type?

Reading the index creation, as well as the mapping docs, there doesn't
seem to be a way to set compression to be on by default for all types
that appear, one would have to define it to be on for the expected
types.

Would it seem (even) more useful to have a per-index top level setting
to make compression on by default rather than need to explicitly set
it per-type in the mappings?

You can do this by putting a mapping for the type 'default' which is
then the base for any other types that you map

clint

cheers,

Paul

wahay! thanks clinton, presumably I can then just set this cluster wide
via the "default-mapping.json" file in the cluster then too right?

that's cool, thanks, I had forgotten about this part of dynamic mappings,
cheers.

Paul

On 3 May 2012 22:01, Clinton Gormley clint@traveljury.com wrote:

Hi Paul

On Thu, 2012-05-03 at 11:12 +1000, Paul Smith wrote:

IIUC, _source compression is available, but off by default, and it can
be turned on at either index creation, or by changing the mappings.
However IIUC as well, the compression setting needs to be set
per-index-type?

Reading the index creation, as well as the mapping docs, there doesn't
seem to be a way to set compression to be on by default for all types
that appear, one would have to define it to be on for the expected
types.

Would it seem (even) more useful to have a per-index top level setting
to make compression on by default rather than need to explicitly set
it per-type in the mappings?

You can do this by putting a mapping for the type 'default' which is
then the base for any other types that you map

clint

cheers,

Paul

Yes, you can also set it in default-mapping.json, though the new preferred
way is to simply put an index template, with a template matching all (*),
and then in it have defualt mapping with the compression of _source set
to true.

On Thu, May 3, 2012 at 3:12 PM, Paul Smith tallpsmith@gmail.com wrote:

wahay! thanks clinton, presumably I can then just set this cluster wide
via the "default-mapping.json" file in the cluster then too right?

that's cool, thanks, I had forgotten about this part of dynamic mappings,
cheers.

Paul

On 3 May 2012 22:01, Clinton Gormley clint@traveljury.com wrote:

Hi Paul

On Thu, 2012-05-03 at 11:12 +1000, Paul Smith wrote:

IIUC, _source compression is available, but off by default, and it can
be turned on at either index creation, or by changing the mappings.
However IIUC as well, the compression setting needs to be set
per-index-type?

Reading the index creation, as well as the mapping docs, there doesn't
seem to be a way to set compression to be on by default for all types
that appear, one would have to define it to be on for the expected
types.

Would it seem (even) more useful to have a per-index top level setting
to make compression on by default rather than need to explicitly set
it per-type in the mappings?

You can do this by putting a mapping for the type 'default' which is
then the base for any other types that you map

clint

cheers,

Paul