Dynamic mapping questions

Hi,

Two questions regarding the mapping process.

  1. I see for the object type you have the field enabled in case you don't want to index it in
    subsequent calls. How can you not index a core type field. Meaning you have an initial mapping where you set your fields.
    But some later call to index can have a core type field that I don't want to index. As it is now, correct me if I'm wrong, it
    will get dynamically mapped. How can I avoid that.

  2. If I change the mapping I have for a document by adding a new field, dynamically or not, it will cause a re-indexing of the already indexed documents?

Thanks
stelios

On Wednesday, February 9, 2011 at 7:49 PM, stelios wrote:

Hi,

Two questions regarding the mapping process.

  1. I see for the object type you have the field enabled in case you don't
    want to index it in
    subsequent calls. How can you not index a core type field. Meaning you have
    an initial mapping where you set your fields.
    But some later call to index can have a core type field that I don't want to
    index. As it is now, correct me if I'm wrong, it
    will get dynamically mapped. How can I avoid that.
    You can set the dynamic flag to false on the root object mapping.

  2. If I change the mapping I have for a document by adding a new field,
    dynamically or not, it will cause a re-indexing of the already indexed
    documents?
    No, you don't need to reindex. Introducing new fields does not require reindexing.

Thanks
stelios

View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Dynamic-mapping-questions-tp2460164p2460164.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

I think I didn't phrase it correctly

consider this json

{
"analysis": {
"audio_info": {
"1_0": {
"successful": true,
"data": {
"bits": 16,
"bitrate": 689.1609186183296,
"channels": 1,
"duration": 9.351,
"samplerate": 44100,
"type": "wav"
}
}
}
}

How can I not index the field "successful". When I do a mapping and not
include this field but then index a document that has this
field then it gets mapped dynamically. Of course I can set dynamic mapping
off and it will work as I want but there are other cases where dynamic
mapping is handy.

Thanks
Stelios

On 9 February 2011 20:32, kimchy [via Elasticsearch Users] <
ml-node+2461059-13164497-341730@n3.nabble.com> wrote:

On Wednesday, February 9, 2011 at 7:49 PM, stelios wrote:

Hi,

Two questions regarding the mapping process.

  1. I see for the object type you have the field enabled in case you don't
    want to index it in
    subsequent calls. How can you not index a core type field. Meaning you have
    an initial mapping where you set your fields.
    But some later call to index can have a core type field that I don't want
    to
    index. As it is now, correct me if I'm wrong, it
    will get dynamically mapped. How can I avoid that.

You can set the dynamic flag to false on the root object mapping.

  1. If I change the mapping I have for a document by adding a new field,
    dynamically or not, it will cause a re-indexing of the already indexed
    documents?

No, you don't need to reindex. Introducing new fields does not require
reindexing.

Thanks
stelios

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Dynamic-mapping-questions-tp2460164p2460164.htmlhttp://elasticsearch-users.115913.n3.nabble.com/Dynamic-mapping-questions-tp2460164p2460164.html?by-user=t
Sent from the Elasticsearch Users mailing list archive at Nabble.com.


If you reply to this email, your message will be added to the discussion
below:

http://elasticsearch-users.115913.n3.nabble.com/Dynamic-mapping-questions-tp2460164p2461059.html
To unsubscribe from Dynamic mapping questions, click herehttp://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2460164&code=c3RldG9naWFzQGdtYWlsLmNvbXwyNDYwMTY0fC0xMDc4NTcwNTM2.

Just to clarify I know that I can use "enabled" : false in the "1_0" object
so it will not map the "successful" field but it won't map any other fields
as well. What I really need is to do something like "successful" :
"not_mapped". Is this possible at the moment?

thanks
stelios

On 11 February 2011 17:56, Stelios Togias stetogias@gmail.com wrote:

I think I didn't phrase it correctly

consider this json

{
"analysis": {
"audio_info": {
"1_0": {
"successful": true,
"data": {
"bits": 16,
"bitrate": 689.1609186183296,
"channels": 1,
"duration": 9.351,
"samplerate": 44100,
"type": "wav"
}
}
}
}

How can I not index the field "successful". When I do a mapping and not
include this field but then index a document that has this
field then it gets mapped dynamically. Of course I can set dynamic mapping
off and it will work as I want but there are other cases where dynamic
mapping is handy.

Thanks
Stelios

On 9 February 2011 20:32, kimchy [via Elasticsearch Users] <
ml-node+2461059-13164497-341730@n3.nabble.com> wrote:

On Wednesday, February 9, 2011 at 7:49 PM, stelios wrote:

Hi,

Two questions regarding the mapping process.

  1. I see for the object type you have the field enabled in case you don't
    want to index it in
    subsequent calls. How can you not index a core type field. Meaning you
    have
    an initial mapping where you set your fields.
    But some later call to index can have a core type field that I don't want
    to
    index. As it is now, correct me if I'm wrong, it
    will get dynamically mapped. How can I avoid that.

You can set the dynamic flag to false on the root object mapping.

  1. If I change the mapping I have for a document by adding a new field,
    dynamically or not, it will cause a re-indexing of the already indexed
    documents?

No, you don't need to reindex. Introducing new fields does not require
reindexing.

Thanks
stelios

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Dynamic-mapping-questions-tp2460164p2460164.htmlhttp://elasticsearch-users.115913.n3.nabble.com/Dynamic-mapping-questions-tp2460164p2460164.html?by-user=t
Sent from the Elasticsearch Users mailing list archive at Nabble.com.


If you reply to this email, your message will be added to the discussion
below:

http://elasticsearch-users.115913.n3.nabble.com/Dynamic-mapping-questions-tp2460164p2461059.html
To unsubscribe from Dynamic mapping questions, click herehttp://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2460164&code=c3RldG9naWFzQGdtYWlsLmNvbXwyNDYwMTY0fC0xMDc4NTcwNTM2.

How can I not index the field "successful". When I do a mapping and
not include this field but then index a document that has this
field then it gets mapped dynamically. Of course I can set dynamic
mapping off and it will work as I want but there are other cases where
dynamic mapping is handy.

Have a look at "index": "analyzed|not_analyzed|no" on this page:

clint

oops...missed it...

thanks
stelios

On 11 February 2011 18:03, Clinton Gormley [via Elasticsearch Users] <
ml-node+2475031-624462903-341730@n3.nabble.com> wrote:

How can I not index the field "successful". When I do a mapping and
not include this field but then index a document that has this
field then it gets mapped dynamically. Of course I can set dynamic
mapping off and it will work as I want but there are other cases where
dynamic mapping is handy.

Have a look at "index": "analyzed|not_analyzed|no" on this page:

Elasticsearch Platform — Find real-time answers at scale | Elastic

clint


If you reply to this email, your message will be added to the discussion
below:

http://elasticsearch-users.115913.n3.nabble.com/Dynamic-mapping-questions-tp2460164p2475031.html
To unsubscribe from Dynamic mapping questions, click herehttp://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2460164&code=c3RldG9naWFzQGdtYWlsLmNvbXwyNDYwMTY0fC0xMDc4NTcwNTM2.