String is tokenized in terms facet but shouldn't be

Hi!

My mapping contains a property of name "type" with the setting (in Python):

'type': {
'store': True,
'type': 'string',
'indexed': 'not_analyzed'
}

when I call the _mapping URL of ElasticSearch, I get this for the field:

type: {
type: 'string',
store: 'yes'
}

Why doesn't ES show the "indexed" setting? Suspicious...

When I call a facet from this property, I get tokenized values instead of
the expected multi-word terms containing spaces. It seems as if the field
is analyzed, despite the settings.

This is how I retrieve the facet:

curl -X POST
"http://localhost:9200/offeneskoeln-latest/_search?pretty=true" -d '
{
"query": {
"query_string": {
"query": ":"
}
},
"facets": {
"type": {
"terms": {
"field" : "type"
}
}
}
}'

Here is some output:

"facets" : {
"type" : {
"_type" : "terms",
"missing" : 0,
"total" : 100,
"other" : 0,
"terms" : [ {
"term" : "antrag",
"count" : 37
}, {
"term" : "beschlussvorlage",
"count" : 24
}, {
"term" : "sitzungsvorlage",
"count" : 13
}, {
"term" : "bbr",
"count" : 13
}, {
"term" : "anfrage",
"count" : 5
}, {
"term" : "zum",
"count" : 2
}, {
"term" : "versand",
"count" : 2
}, {
"term" : "informationsvorlage",
"count" : 2
}, {
"term" : "mündlicher",
"count" : 1
}, {
"term" : "bericht",
"count" : 1
} ]
}
}

The original values where e.g. "Beschlussvorlage", "BBR-Sitzungsvorlage",
"Mündlicher Bericht" etc.

Using ElasticSearch version 0.20.6.

Thanks in advance!

Marian

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hey

I think it should be "index":"not_analyzed" (instead of indexed). Or is it
converted somewhere in your python script and I misread it?

--Alex

On Tue, Apr 9, 2013 at 4:05 PM, Marian Steinbach <marian.steinbach@gmail.com

wrote:

Hi!

My mapping contains a property of name "type" with the setting (in Python):

'type': {
'store': True,
'type': 'string',
'indexed': 'not_analyzed'
}

when I call the _mapping URL of Elasticsearch, I get this for the field:

type: {
type: 'string',
store: 'yes'
}

Why doesn't ES show the "indexed" setting? Suspicious...

When I call a facet from this property, I get tokenized values instead of
the expected multi-word terms containing spaces. It seems as if the field
is analyzed, despite the settings.

This is how I retrieve the facet:

curl -X POST "
http://localhost:9200/offeneskoeln-latest/_search?pretty=true" -d '
{
"query": {
"query_string": {
"query": ":"
}
},
"facets": {
"type": {
"terms": {
"field" : "type"
}
}
}
}'

Here is some output:

"facets" : {
"type" : {
"_type" : "terms",
"missing" : 0,
"total" : 100,
"other" : 0,
"terms" : [ {
"term" : "antrag",
"count" : 37
}, {
"term" : "beschlussvorlage",
"count" : 24
}, {
"term" : "sitzungsvorlage",
"count" : 13
}, {
"term" : "bbr",
"count" : 13
}, {
"term" : "anfrage",
"count" : 5
}, {
"term" : "zum",
"count" : 2
}, {
"term" : "versand",
"count" : 2
}, {
"term" : "informationsvorlage",
"count" : 2
}, {
"term" : "mündlicher",
"count" : 1
}, {
"term" : "bericht",
"count" : 1
} ]
}
}

The original values where e.g. "Beschlussvorlage", "BBR-Sitzungsvorlage",
"Mündlicher Bericht" etc.

Using Elasticsearch version 0.20.6.

Thanks in advance!

Marian

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Aaah! "Brett vorm Kopf" we say where I come from.

Thank you very much! Case closed. On to the next...

Marian

Am Dienstag, 9. April 2013 16:20:21 UTC+2 schrieb Alexander Reelsen:

Hey

I think it should be "index":"not_analyzed" (instead of indexed). Or is it
converted somewhere in your python script and I misread it?

--Alex

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.