Type storage issues

It looks like Elastic Search is overriding my default mapping values when it
adds defaults dynamically.

I'm seeing ints being stored as longs and floats and double being stored as
string when using
client.admin().indices().create(createRequest)

Dates appear fine.

Here is part of the value used in createRequest.settings(value):
"trxamount":{"type":"double","boost":1}

Here is what I see in the logs:
trxamount":{"type":"string","index_name":"trxamount","index":"analyzed","store":"no","term_vector":"no","boost":1.0,"omit_norms":false,"omit_term_freq_and_positions":false}

I initially create an index using mappings, I don't provide all the fields
such term_vector omit_terms etc, so Elastic Search is dynamically adding
them later when I perform an index.
It looks like it is overriding my mappings.

I created Type storage issues · Issue #244 · elastic/elasticsearch · GitHub for
this.

On Fri, Jul 2, 2010 at 5:19 PM, Samuel Doyle samueldoyle@gmail.com wrote:

It looks like Elastic Search is overriding my default mapping values when
it adds defaults dynamically.

I'm seeing ints being stored as longs and floats and double being stored as
string when using
client.admin().indices().create(createRequest)

Dates appear fine.

Here is part of the value used in createRequest.settings(value):
"trxamount":{"type":"double","boost":1}

Here is what I see in the logs:

trxamount":{"type":"string","index_name":"trxamount","index":"analyzed","store":"no","term_vector":"no","boost":1.0,"omit_norms":false,"omit_term_freq_and_positions":false}

I initially create an index using mappings, I don't provide all the fields
such term_vector omit_terms etc, so Elastic Search is dynamically adding
them later when I perform an index.
It looks like it is overriding my mappings.

Can you explain how you set the mappings in the API? You don't set them
through the settings on the createRequest, there is an API to put mappings,
or add mappings as part of the API to create an index. If you provide
explicit mappings, then elasticsearch should not override what you provided.

-shay.banon

On Sat, Jul 3, 2010 at 3:23 AM, Samuel Doyle samueldoyle@gmail.com wrote:

I created Type storage issues · Issue #244 · elastic/elasticsearch · GitHub this.

On Fri, Jul 2, 2010 at 5:19 PM, Samuel Doyle samueldoyle@gmail.comwrote:

It looks like Elastic Search is overriding my default mapping values when
it adds defaults dynamically.

I'm seeing ints being stored as longs and floats and double being stored
as string when using
client.admin().indices().create(createRequest)

Dates appear fine.

Here is part of the value used in createRequest.settings(value):
"trxamount":{"type":"double","boost":1}

Here is what I see in the logs:

trxamount":{"type":"string","index_name":"trxamount","index":"analyzed","store":"no","term_vector":"no","boost":1.0,"omit_norms":false,"omit_term_freq_and_positions":false}

I initially create an index using mappings, I don't provide all the fields
such term_vector omit_terms etc, so Elastic Search is dynamically adding
them later when I perform an index.
It looks like it is overriding my mappings.

Perhaps I was using the incorrect api call, I have debug log messages
enabled for Elastic Search but did not see any problems.

I assume this is the one I want to be using during create? I will try again
tomorrow.
public CreateIndexRequest mapping(String type, Map source)

Thanks again for your help.

On Sun, Jul 4, 2010 at 1:50 AM, Shay Banon shay.banon@elasticsearch.comwrote:

Can you explain how you set the mappings in the API? You don't set them
through the settings on the createRequest, there is an API to put mappings,
or add mappings as part of the API to create an index. If you provide
explicit mappings, then elasticsearch should not override what you provided.

-shay.banon

On Sat, Jul 3, 2010 at 3:23 AM, Samuel Doyle samueldoyle@gmail.comwrote:

I created Type storage issues · Issue #244 · elastic/elasticsearch · GitHub this.

On Fri, Jul 2, 2010 at 5:19 PM, Samuel Doyle samueldoyle@gmail.comwrote:

It looks like Elastic Search is overriding my default mapping values when
it adds defaults dynamically.

I'm seeing ints being stored as longs and floats and double being stored
as string when using
client.admin().indices().create(createRequest)

Dates appear fine.

Here is part of the value used in createRequest.settings(value):
"trxamount":{"type":"double","boost":1}

Here is what I see in the logs:

trxamount":{"type":"string","index_name":"trxamount","index":"analyzed","store":"no","term_vector":"no","boost":1.0,"omit_norms":false,"omit_term_freq_and_positions":false}

I initially create an index using mappings, I don't provide all the
fields such term_vector omit_terms etc, so Elastic Search is dynamically
adding them later when I perform an index.
It looks like it is overriding my mappings.

Yes, either that one, or you can provide a json string that represents the
mappings. In any case, the Map is simply a "json" structured maps.

-shay.banon

On Sun, Jul 4, 2010 at 7:16 PM, Samuel Doyle samueldoyle@gmail.com wrote:

Perhaps I was using the incorrect api call, I have debug log messages
enabled for Elastic Search but did not see any problems.

I assume this is the one I want to be using during create? I will try again
tomorrow.
public CreateIndexRequest mapping(String type, Map source)

Thanks again for your help.

On Sun, Jul 4, 2010 at 1:50 AM, Shay Banon shay.banon@elasticsearch.comwrote:

Can you explain how you set the mappings in the API? You don't set them
through the settings on the createRequest, there is an API to put mappings,
or add mappings as part of the API to create an index. If you provide
explicit mappings, then elasticsearch should not override what you provided.

-shay.banon

On Sat, Jul 3, 2010 at 3:23 AM, Samuel Doyle samueldoyle@gmail.comwrote:

I created Type storage issues · Issue #244 · elastic/elasticsearch · GitHub this.

On Fri, Jul 2, 2010 at 5:19 PM, Samuel Doyle samueldoyle@gmail.comwrote:

It looks like Elastic Search is overriding my default mapping values
when it adds defaults dynamically.

I'm seeing ints being stored as longs and floats and double being stored
as string when using
client.admin().indices().create(createRequest)

Dates appear fine.

Here is part of the value used in createRequest.settings(value):
"trxamount":{"type":"double","boost":1}

Here is what I see in the logs:

trxamount":{"type":"string","index_name":"trxamount","index":"analyzed","store":"no","term_vector":"no","boost":1.0,"omit_norms":false,"omit_term_freq_and_positions":false}

I initially create an index using mappings, I don't provide all the
fields such term_vector omit_terms etc, so Elastic Search is dynamically
adding them later when I perform an index.
It looks like it is overriding my mappings.