Hi All,
I had a problem with bulk indexing. here is a sample query that I was
using for it. Not sure what's the problem butt getting an error
message below:
curl -X PUT "http://localhost:9200/_bulk " -d '{ "index" : { "_index" :
"profusion_db", "_type" : "service_index", "_id" : "1" } }
{ "field1" : "value1" }
'
Result is:
{"error":"[_bulk] Invalid index name [bulk], must not start with
' '"}
Any help will be really really appreciated
On Thu, 2011-07-14 at 23:39 -0700, Michael wrote:
Hi All,
I had a problem with bulk indexing. here is a sample query that I was
using for it. Not sure what's the problem butt getting an error
message below:
curl -X PUT "http://localhost:9200/_bulk " -d '{ "index" : { "_index" :
"profusion_db", "_type" : "service_index", "_id" : "1" } }
{ "field1" : "value1" }
'
Result is:
{"error":"[_bulk] Invalid index name [bulk], must not start with
' '"}
Any help will be really really appreciated
You have too many newlines. Are you on windows perhaps? Try this:
curl -X PUT "http://localhost:9200/_bulk " -d '
{ "index" : { "_index" :"profusion_db", "_type" : "service_index","_id" : "1" } }
{ "field1" : "value1" }
'
clint
Actually the newlines are just copy/paste issues. The same error even
with reduced newlines.
BTW I'm running elasticsearch on Mac OS X 10.6.8. Using Elasticsearch
0.16.4
Regards,
Michael
On Jul 15, 1:41 pm, Clinton Gormley clin...@iannounce.co.uk wrote:
On Thu, 2011-07-14 at 23:39 -0700, Michael wrote:
Hi All,
I had a problem with bulk indexing. here is a sample query that I was
using for it. Not sure what's the problem butt getting an error
message below:
curl -X PUT "http://localhost:9200/_bulk " -d '{ "index" : { "_index" :
"profusion_db", "_type" : "service_index", "_id" : "1" } }
{ "field1" : "value1" }
'
Result is:
{"error":"[_bulk] Invalid index name [bulk], must not start with
' '"}
Any help will be really really appreciated
You have too many newlines. Are you on windows perhaps? Try this:
curl -X PUT "http://localhost:9200/_bulk " -d '
{ "index" : { "_index" :"profusion_db", "_type" : "service_index","_id" : "1" } }
{ "field1" : "value1" }
'
clint
Hi Michael
BTW I'm running elasticsearch on Mac OS X 10.6.8. Using Elasticsearch
0.16.4
I'm on linux with 0.16.4, and this works for me:
curl -X PUT "http://localhost:9200/_bulk " -d '
{ "index" : { "_index" :"profusion_db", "_type" : "service_index","_id" : "1" } }
{ "field1" : "value1" }
'
{"took":12,"items":[{"index":{"_index":"profusion_db","_type":"service_index","_id":"1","_version":1,"ok":true}}]}
clint
I've tried the same query on linux as well getting the same error. Is
it possible that I've a wrong configuration?
On Jul 15, 2:47 pm, Clinton Gormley clin...@iannounce.co.uk wrote:
Hi Michael
BTW I'm running elasticsearch on Mac OS X 10.6.8. Using Elasticsearch
0.16.4
I'm on linux with 0.16.4, and this works for me:
curl -X PUT "http://localhost:9200/_bulk " -d '
{ "index" : { "_index" :"profusion_db", "_type" : "service_index","_id" : "1" } }
{ "field1" : "value1" }
'
{"took":12,"items":[{"index":{"_index":"profusion_db","_type":"service_inde x","_id":"1","_version":1,"ok":true}}]}
clint
On Fri, 2011-07-15 at 02:58 -0700, Michael wrote:
I've tried the same query on linux as well getting the same error. Is
it possible that I've a wrong configuration?
I don't know what configuration could affect this.
Try it on a new install and see if that works
I'm wondering if what you're pasting has got \r\n line endings, and that
is affecting it.
Try saving the command to a file, running dos2unix on it, and running it
as a shell script.
clint
Tried with explicit dos2unix as well no effect. Getting the same error
as before.
On Jul 15, 3:12 pm, Clinton Gormley clin...@iannounce.co.uk wrote:
On Fri, 2011-07-15 at 02:58 -0700, Michael wrote:
I've tried the same query on linux as well getting the same error. Is
it possible that I've a wrong configuration?
I don't know what configuration could affect this.
Try it on a new install and see if that works
I'm wondering if what you're pasting has got \r\n line endings, and that
is affecting it.
Try saving the command to a file, running dos2unix on it, and running it
as a shell script.
clint
On Fri, 2011-07-15 at 03:43 -0700, Michael wrote:
Tried with explicit dos2unix as well no effect. Getting the same error
as before.
I tried the other way around (unix2dos) and that still succeeded.
And if I tried with extra new lines, I got:
Unexpected end-of-input within/between OBJECT entries
so it's not that either.
I'm a bit stumped. What do you have in your config? Are you using index
templates or something?
Have you tried on a new install?
Just to be absolutely sure that we're doing the same thing, I attach a
shell script. Just run it as: bash t.sh
clint
Thanks a lot for helping to figure out the issue. I've run the
attachement and no success. I'm not using any index template at all.
And actually I'm running on a fresh install locally on my mac.
Regards,
Michael
On Jul 15, 3:54 pm, Clinton Gormley clin...@iannounce.co.uk wrote:
On Fri, 2011-07-15 at 03:43 -0700, Michael wrote:
Tried with explicit dos2unix as well no effect. Getting the same error
as before.
I tried the other way around (unix2dos) and that still succeeded.
And if I tried with extra new lines, I got:
Unexpected end-of-input within/between OBJECT entries
so it's not that either.
I'm a bit stumped. What do you have in your config? Are you using index
templates or something?
Have you tried on a new install?
Just to be absolutely sure that we're doing the same thing, I attach a
shell script. Just run it as: bash t.sh
clint
t.sh
< 1KViewDownload
Here is what I have in my elasticsearch.yml config file:
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]
#network .publish_host: 192.168.50.1
network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1
node.data: true # Default
http.port: 9200 # Default
http.max_content_length: 100 # Default
cluster.name: "Profusion"
#discovery .zen.ping.unicast.hosts: 192.168.50.2:9300
#discovery .zen.fd.initial_ping_timeout: 30 # Default
#discovery .zen.fd.fdping_interval: 10 # Default
#discovery .zen.fd.ping_retries: 30 # Default
On Fri, 2011-07-15 at 04:42 -0700, Michael wrote:
Here is what I have in my elasticsearch.yml config file:
OK - I tried with this config, and it still worked fine.
Are you absolutely sure that you're using v 0.16.4 (sorry to ask, but
I'm clutching at straws). You can see the version with:
curl localhost:9200
Not related but you're specifying gateway.type: fs, but you're not
specifying the dir to use for the shared fs gateway.
Just use the default gateway.
clint
Oppps ... I've installed v 0.16.4 but was running v 0.9.1. Fixed the
version and got it working. Thank you very much for your time and
sorry again for taking that much time from you.
Regards,
Michael
On Jul 15, 5:11 pm, Clinton Gormley clin...@iannounce.co.uk wrote:
On Fri, 2011-07-15 at 04:42 -0700, Michael wrote:
Here is what I have in my elasticsearch.yml config file:
OK - I tried with this config, and it still worked fine.
Are you absolutely sure that you're using v 0.16.4 (sorry to ask, but
I'm clutching at straws). You can see the version with:
curl localhost:9200
Not related but you're specifying gateway.type: fs, but you're not
specifying the dir to use for the shared fs gateway.
Just use the default gateway.
clint
kimchy
(Shay Banon)
July 15, 2011, 5:17pm
13
Heya, some notes on the config:
Its enough to set network.host to a single value.
The http.max_content_length should default to 100mb, not 100
On Friday, July 15, 2011 at 2:42 PM, Michael wrote:
Here is what I have in my elasticsearch.yml config file:
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]
#network .publish_host: 192.168.50.1
network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1
node.data: true # Default
http.port: 9200 # Default
http.max_content_length: 100 # Default
cluster.name (http://cluster.name ): "Profusion"
#discovery .zen.ping.unicast.hosts: 192.168.50.2:9300
#discovery .zen.fd.initial_ping_timeout: 30 # Default
#discovery .zen.fd.fdping_interval: 10 # Default
#discovery .zen.fd.ping_retries: 30 # Default
I've already changed 100 to 100mb thanks anyway :))
Regards,
Michael
On Jul 15, 10:17 pm, Shay Banon shay.ba...@elasticsearch.com wrote:
Heya, some notes on the config:
Its enough to set network.host to a single value.
The http.max_content_length should default to 100mb, not 100
On Friday, July 15, 2011 at 2:42 PM, Michael wrote:
Here is what I have in my elasticsearch.yml config file:
node :
data : true
gateway :
type : fs
index :
analysis :
analyzer :
default :
type : custom
tokenizer : standard
filter : [standard, lowercase, porterStem, stop]
#network .publish_host: 192.168.50.1
network.publish_host: 127.0.0.1
network.bind_host: 127.0.0.1
network.host: 127.0.0.1
node.data: true # Default
http.port: 9200 # Default
http.max_content_length: 100 # Default
cluster.name (http://cluster.name ):"Profusion"
#discovery .zen.ping.unicast.hosts: 192.168.50.2:9300
#discovery .zen.fd.initial_ping_timeout: 30 # Default
#discovery .zen.fd.fdping_interval: 10 # Default
#discovery .zen.fd.ping_retries: 30 # Default