Hi,
Firstly, many thanks to Kimchy for very cool stuff.
I have a small (hopefully not silly) question. We attempted to use
colon in a field name. Nothing strange happened until we tried to pass
that field name to "fields" parameter in a query.
curl -XPOST 'localhost:9200/myIndex/myType/_search?pretty=on' -d '
{
"fields": ["abcd:field1", "field2", "field3" ],
"query": {
"query_string": {
"query": "Bonsai cool"
}
}
}
'
In the result set, only "field2" and "field3" are included in _source.
Seems that ES simply ignore the "abcd:field1". Anyway to workaround?
In our context, we really need a special character to act as a prefix
namespace separator, and don't want to do the boring replace() process
all the time.
I've thoroughly noticed your advice here: http://elasticsearch-users.115913.n3.nabble.com/Using-space-characters-in-a-field-s-name-td2760404.html
. So, can you please show me where I can find naming guidelines for
field name?
Thanks a lot.
Hi,
Firstly, many thanks to Kimchy for very cool stuff.
I have a small (hopefully not silly) question. We attempted to use
colon in a field name. Nothing strange happened until we tried to pass
that field name to "fields" parameter in a query.
curl -XPOST 'localhost:9200/myIndex/myType/_search?pretty=on' -d '
{
"fields": ["abcd:field1", "field2", "field3" ],
"query": {
"query_string": {
"query": "Bonsai cool"
}
}
}
'
In the result set, only "field2" and "field3" are included in _source.
Seems that ES simply ignore the "abcd:field1". Anyway to workaround?
In our context, we really need a special character to act as a prefix
namespace separator, and don't want to do the boring replace() process
all the time.
I've thoroughly noticed your advice here: http://elasticsearch-users.115913.n3.nabble.com/Using-space-characters-in-a-field-s-name-td2760404.html
. So, can you please show me where I can find naming guidelines for
field name?
Thanks a lot.
@David: thanks for the quick reply.
Yes, it's a nice option. However, since underscore is pretty popular, and
can be part of the original fieldname as well, I prefer a special character
(if possible).
Anyway, would be great if it is explicitly stated somewhere what we should
(and shouldn't) use for field name. Besides, the indexing process doesn't
complain... :P.
@David: thanks for the quick reply.
Yes, it's a nice option. However, since underscore is pretty popular, and
can be part of the original fieldname as well, I prefer a special character
(if possible).
Anyway, would be great if it is explicitly stated somewhere what we should
(and shouldn't) use for field name. Besides, the indexing process doesn't
complain... :P.
Thanks,
LTVP
On Fri, Sep 23, 2011 at 2:12 AM, David Pilato david@pilato.fr wrote:
Hi,
Firstly, many thanks to Kimchy for very cool stuff.
I have a small (hopefully not silly) question. We attempted to use
colon in a field name. Nothing strange happened until we tried to pass
that field name to "fields" parameter in a query.
curl -XPOST 'localhost:9200/myIndex/myType/_search?pretty=on' -d '
{
"fields": ["abcd:field1", "field2", "field3" ],
"query": {
"query_string": {
"query": "Bonsai cool"
}
}
}
'
In the result set, only "field2" and "field3" are included in _source.
Seems that ES simply ignore the "abcd:field1". Anyway to workaround?
In our context, we really need a special character to act as a prefix
namespace separator, and don't want to do the boring replace() process
all the time.
I've thoroughly noticed your advice here:
@David: thanks for the quick reply.
Yes, it's a nice option. However, since underscore is pretty popular, and can be part of the original fieldname as well, I prefer a special character (if possible).
Anyway, would be great if it is explicitly stated somewhere what we should (and shouldn't) use for field name. Besides, the indexing process doesn't complain... :P.
Thanks,
LTVP
On Fri, Sep 23, 2011 at 2:12 AM, David Pilato david@pilato.fr wrote:
Can't you use underscore _ ?
Hi,
Firstly, many thanks to Kimchy for very cool stuff.
I have a small (hopefully not silly) question. We attempted to use
colon in a field name. Nothing strange happened until we tried to pass
that field name to "fields" parameter in a query.
curl -XPOST 'localhost:9200/myIndex/myType/_search?pretty=on' -d '
{
"fields": ["abcd:field1", "field2", "field3" ],
"query": {
"query_string": {
"query": "Bonsai cool"
}
}
}
'
In the result set, only "field2" and "field3" are included in _source.
Seems that ES simply ignore the "abcd:field1". Anyway to workaround?
In our context, we really need a special character to act as a prefix
namespace separator, and don't want to do the boring replace() process
all the time.
I've thoroughly noticed your advice here: http://elasticsearch-users.115913.n3.nabble.com/Using-space-characters-in-a-field-s-name-td2760404.html
. So, can you please show me where I can find naming guidelines for
field name?
Thanks a lot.
@David: thanks for the quick reply.
Yes, it's a nice option. However, since underscore is pretty popular, and
can be part of the original fieldname as well, I prefer a special
character (if possible).
Anyway, would be great if it is explicitly stated somewhere what we should
(and shouldn't) use for field name. Besides, the indexing process doesn't
complain... :P.
Hi,
Firstly, many thanks to Kimchy for very cool stuff.
I have a small (hopefully not silly) question. We attempted to use
colon in a field name. Nothing strange happened until we tried to pass
that field name to "fields" parameter in a query.
curl -XPOST 'localhost:9200/myIndex/myType/_search?pretty=on' -d '
{
"fields": ["abcd:field1", "field2", "field3" ],
"query": {
"query_string": {
"query": "Bonsai cool"
}
}
}
'
In the result set, only "field2" and "field3" are included in _source.
Seems that ES simply ignore the "abcd:field1". Anyway to workaround?
In our context, we really need a special character to act as a prefix
namespace separator, and don't want to do the boring replace() process
all the time.
I've thoroughly noticed your advice here:
@David: thanks for the quick reply.
Yes, it's a nice option. However, since underscore is pretty popular, and
can be part of the original fieldname as well, I prefer a special
character (if possible).
Anyway, would be great if it is explicitly stated somewhere what we should
(and shouldn't) use for field name. Besides, the indexing process doesn't
complain... :P.
Hi,
Firstly, many thanks to Kimchy for very cool stuff.
I have a small (hopefully not silly) question. We attempted to use
colon in a field name. Nothing strange happened until we tried to pass
that field name to "fields" parameter in a query.
curl -XPOST 'localhost:9200/myIndex/myType/_search?pretty=on' -d '
{
"fields": ["abcd:field1", "field2", "field3" ],
"query": {
"query_string": {
"query": "Bonsai cool"
}
}
}
'
In the result set, only "field2" and "field3" are included in _source.
Seems that ES simply ignore the "abcd:field1". Anyway to workaround?
In our context, we really need a special character to act as a prefix
namespace separator, and don't want to do the boring replace() process
all the time.
I've thoroughly noticed your advice here:
Using a field called "some:field" in the fields and wanting to load it from
source itself will fail in 0.17 because it is, internally, uses scripting to
extract the value from source. In master, it will not fail. Having said
that, I think that its better not to use ':' as the separator, as when you
try and use things like query_string on it, you will run into quirks.
@David: thanks for the quick reply.
Yes, it's a nice option. However, since underscore is pretty popular,
and
can be part of the original fieldname as well, I prefer a special
character (if possible).
Anyway, would be great if it is explicitly stated somewhere what we
should
(and shouldn't) use for field name. Besides, the indexing process
doesn't
complain... :P.
Hi,
Firstly, many thanks to Kimchy for very cool stuff.
I have a small (hopefully not silly) question. We attempted to use
colon in a field name. Nothing strange happened until we tried to
pass
that field name to "fields" parameter in a query.
curl -XPOST 'localhost:9200/myIndex/myType/_search?pretty=on' -d '
{
"fields": ["abcd:field1", "field2", "field3" ],
"query": {
"query_string": {
"query": "Bonsai cool"
}
}
}
'
In the result set, only "field2" and "field3" are included in
_source.
Seems that ES simply ignore the "abcd:field1". Anyway to workaround?
In our context, we really need a special character to act as a
prefix
namespace separator, and don't want to do the boring replace()
process
all the time.
I've thoroughly noticed your advice here:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.