I'm running Elasticsearch 1.0.1 using the following
$ES_HOME/config/default-mapping.json:
{
"_default": {
"properties": {
"foo": {
"type": "nested",
"include_in_all": false,
"properties": {
"bar": {
"type": "string",
"index": "not_analyzed",
"include_in_all": false,
"fields": {
"lower": {
"analyzer": "lowercase",
"type": "string"
}
}
}
}
}
}
}
}
When i post the following, the include_in_all does not seem to be
recognized at any level:
{
"foo": {
"bar": "Elasticsearch rules!"
}
}
The resulting index metadata is the following:
{
state: open
settings: {
index: {
uuid: TJf_oVKLSzuGD1q8xWq9nw
number_of_replicas: 0
number_of_shards: 1
version: {
created: 1000199
}
}
}
mappings: {
foobar: {
properties: {
foo: {
properties: {
bar: {
type: string
}
}
}
}
}
}
aliases: [ ]
}
I verified that _all does include the "elasticsearch rules" via the
following aggregation search:
{
"aggs": {
"foobar": {
"terms": {
"field": "_all"
}
}
},
"size": 0
}
The aggregation results are the following:
{
took: 25
timed_out: false
_shards: {
total: 1
successful: 1
failed: 0
}
hits: {
total: 1
max_score: 0
hits: [ ]
}
aggregations: {
foo: {
buckets: [
{
key: elasticsearch
doc_count: 1
}
{
key: rules
doc_count: 1
}
]
}
}
}
Any idea what I'm doing wrong, or is this a bug?
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/54564669-d69c-48a9-85b5-a0a9c8162ff7%40googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
spinscale
(Alexander Reelsen)
March 7, 2014, 8:21am
2
Hey,
must be default , not _default as shown in your default-mapping.json
--Alex
On Thu, Mar 6, 2014 at 9:40 PM, asanderson a.steven.anderson@gmail.com wrote:
I'm running Elasticsearch 1.0.1 using the following
$ES_HOME/config/default-mapping.json:
{
"_default": {
"properties": {
"foo": {
"type": "nested",
"include_in_all": false,
"properties": {
"bar": {
"type": "string",
"index": "not_analyzed",
"include_in_all": false,
"fields": {
"lower": {
"analyzer": "lowercase",
"type": "string"
}
}
}
}
}
}
}
}
When i post the following, the include_in_all does not seem to be
recognized at any level:
{
"foo": {
"bar": "Elasticsearch rules!"
}
}
The resulting index metadata is the following:
{
state: open
settings: {
index: {
uuid: TJf_oVKLSzuGD1q8xWq9nw
number_of_replicas: 0
number_of_shards: 1
version: {
created: 1000199
}
}
}
mappings: {
foobar: {
properties: {
foo: {
properties: {
bar: {
type: string
}
}
}
}
}
}
aliases:
}
I verified that _all does include the "elasticsearch rules" via the
following aggregation search:
{
"aggs": {
"foobar": {
"terms": {
"field": "_all"
}
}
},
"size": 0
}
The aggregation results are the following:
{
took: 25
timed_out: false
_shards: {
total: 1
successful: 1
failed: 0
}
hits: {
total: 1
max_score: 0
hits:
}
aggregations: {
foo: {
buckets: [
{
key: elasticsearch
doc_count: 1
}
{
key: rules
doc_count: 1
}
]
}
}
}
Any idea what I'm doing wrong, or is this a bug?
--
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 .
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/54564669-d69c-48a9-85b5-a0a9c8162ff7%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/54564669-d69c-48a9-85b5-a0a9c8162ff7%40googlegroups.com?utm_medium=email&utm_source=footer
.
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_qJPi6hsqwhVAZHX9pDA9xk23HsoXvR6bAn1Yvh_ab-w%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .
must be default , not _default as shown in your default-mapping.json
Ahhh...good catch. That was a typo. However, after fixing that typo, the
problem remains.
The aggs search result is the following:
{
took: 36
timed_out: false
_shards: {
total: 1
successful: 1
failed: 0
}
hits: {
total: 1
max_score: 0
hits:
}
aggregations: {
foo: {
buckets: [
{
key: elasticsearch
doc_count: 1
}
{
key: rule
doc_count: 1
}
]
}
}
}
My revised default-mapping.json is the following (I also changed an
analyzer):
{
"default ": {
"properties": {
"foo": {
"type": "nested",
"include_in_all": false,
"properties": {
"bar": {
"type": "string",
"index": "not_analyzed",
"include_in_all": false,
"fields": {
"lower": {
"analyzer": "standard",
"type": "string"
}
}
}
}
}
}
}
}
The resulting metadata is the following:
{
state: open
settings: {
index: {
uuid: S2hmo2d3SGWFP51PXs6XbA
number_of_replicas: 0
number_of_shards: 1
version: {
created: 1000199
}
}
}
mappings: {
foobar: {
properties: {
foo: {
include_in_all: false
properties: {
bar: {
include_in_all: false
index: not_analyzed
type: string
fields: {
lower: {
analyzer: standard
type: string
}
}
}
}
type: nested
}
}
}
}
aliases:
}
So, is this a bug?
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e0dac3e7-d825-41d8-bb35-ab33ef8c7290%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .