New windows install

Windows XP Pro
elasticsearch is 0.16.2

java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

  1. how do I make this an auto-start Service?

  2. running CURL

I did this...

curl -X GET http://localhost:9200/_cluster/health?pretty=true
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 5,
"active_shards" : 5,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 5
}

This worked.

I did this...

curl -X GET http://localhost:9200
{
"ok" : true,
"name" : "Peepers",
"version" : {
"number" : "0.16.2",
"date" : "2011-05-31T23:43:18",
"snapshot_build" : false
},
"tagline" : "You Know, for Search",
"cover" : "DON'T PANIC",
"quote" : {
"book" : "The Hitchhiker's Guide to the Galaxy",
"chapter" : "Chapter 12",
"text1" : "If there's anything bigger than my ego around, I want
it caught a
nd shot now."
}
}

It worked.

I tried this...

curl -XPUT 'http://localhost:9200/twitter/user/kimchy' -d '{ "name" : "Shay Ban
on" }'
curl: (1) Protocol 'http not supported or disabled in libcurl
curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

no luck.

I tried this (I took out the quotes from around the URL)...

curl -i -XPUT http://localhost:9200/twitter/user/kimchy -d '{ "name" : "Shay Ba
non" }'
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Content-Length: 260

{"error":"MapperParsingException[Failed to parse]; nested:
JsonParseException[
Unexpected character (''' (code 39)): expected a valid value (number,
String, array,
yobject, 'true', 'false' or 'null')\n at [Source: [B@8140ed; line: 1, column:2]]; ","
status":400}curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

oops

Can anyone tell me what I am doing wrong?

Thanks

Walter

Looks like something is wrong with the curl execution and the -d option. Donno what it is, but does not look like a problem in elasticsearch.

On Saturday, June 4, 2011 at 2:08 AM, phpWalter wrote:

Windows XP Pro
elasticsearch is 0.16.2

java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

  1. how do I make this an auto-start Service?

  2. running CURL

I did this...

curl -X GET http://localhost:9200/_cluster/health?pretty=true
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 5,
"active_shards" : 5,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 5
}

This worked.

I did this...

curl -X GET http://localhost:9200
{
"ok" : true,
"name" : "Peepers",
"version" : {
"number" : "0.16.2",
"date" : "2011-05-31T23:43:18",
"snapshot_build" : false
},
"tagline" : "You Know, for Search",
"cover" : "DON'T PANIC",
"quote" : {
"book" : "The Hitchhiker's Guide to the Galaxy",
"chapter" : "Chapter 12",
"text1" : "If there's anything bigger than my ego around, I want
it caught a
nd shot now."
}
}

It worked.

I tried this...

curl -XPUT 'http://localhost:9200/twitter/user/kimchy' -d '{ "name" : "Shay Ban
on" }'
curl: (1) Protocol 'http not supported or disabled in libcurl
curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

no luck.

I tried this (I took out the quotes from around the URL)...

curl -i -XPUT http://localhost:9200/twitter/user/kimchy -d '{ "name" : "Shay Ba
non" }'
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Content-Length: 260

{"error":"MapperParsingException[Failed to parse]; nested:
JsonParseException[
Unexpected character (''' (code 39)): expected a valid value (number,
String, array,
yobject, 'true', 'false' or 'null')\n at [Source: [B@8140ed; line: 1, column:2]]; ","
status":400}curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

oops

Can anyone tell me what I am doing wrong?

Thanks

Walter

OK.

GET works, PUT does not. Neither did any of the given POST examples.

But I can use PUT and POST to my other server from this PC.

Any idea where I can get help figuring this out?

I trying to eval this as an option to improve how we handle our financial
commentaries; some 200 a day are created in our office.

Thanks

On Fri, Jun 3, 2011 at 6:23 PM, Shay Banon shay.banon@elasticsearch.comwrote:

Looks like something is wrong with the curl execution and the -d option.
Donno what it is, but does not look like a problem in elasticsearch.

On Saturday, June 4, 2011 at 2:08 AM, phpWalter wrote:

Windows XP Pro
elasticsearch is 0.16.2

java -version

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

  1. how do I make this an auto-start Service?

  2. running CURL

I did this...

curl -X GET http://localhost:9200/_cluster/health?pretty=true

{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 5,
"active_shards" : 5,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 5
}

This worked.

I did this...

curl -X GET http://localhost:9200

{
"ok" : true,
"name" : "Peepers",
"version" : {
"number" : "0.16.2",
"date" : "2011-05-31T23:43:18",
"snapshot_build" : false
},
"tagline" : "You Know, for Search",
"cover" : "DON'T PANIC",
"quote" : {
"book" : "The Hitchhiker's Guide to the Galaxy",
"chapter" : "Chapter 12",
"text1" : "If there's anything bigger than my ego around, I want
it caught a
nd shot now."
}
}

It worked.

I tried this...

curl -XPUT 'http://localhost:9200/twitter/user/kimchy' -d '{ "name" :
"Shay Ban

on" }'
curl: (1) Protocol 'http not supported or disabled in libcurl
curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

no luck.

I tried this (I took out the quotes from around the URL)...

curl -i -XPUT http://localhost:9200/twitter/user/kimchy -d '{ "name" :
"Shay Ba

non" }'
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Content-Length: 260

{"error":"MapperParsingException[Failed to parse]; nested:
JsonParseException[
Unexpected character (''' (code 39)): expected a valid value (number,
String, array,
yobject, 'true', 'false' or 'null')\n at [Source: [B@8140ed; line: 1, column:2]]; ","
status":400}curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

oops

Can anyone tell me what I am doing wrong?

Thanks

Walter

how are you executing your queries? Try elasticsearch head or try to
embed the statements in a bat script to avoid windows command line
hassle IMO

On Jun 4, 1:37 am, Walter Torres wal...@torres.ws wrote:

OK.

GET works, PUT does not. Neither did any of the given POST examples.

But I can use PUT and POST to my other server from this PC.

Any idea where I can get help figuring this out?

I trying to eval this as an option to improve how we handle our financial
commentaries; some 200 a day are created in our office.

Thanks

On Fri, Jun 3, 2011 at 6:23 PM, Shay Banon shay.ba...@elasticsearch.comwrote:

Looks like something is wrong with the curl execution and the -d option.
Donno what it is, but does not look like a problem in elasticsearch.

On Saturday, June 4, 2011 at 2:08 AM, phpWalter wrote:

Windows XP Pro
elasticsearch is 0.16.2

java -version

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

  1. how do I make this an auto-start Service?
  1. running CURL

I did this...

curl -X GEThttp://localhost:9200/_cluster/health?pretty=true

{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 5,
"active_shards" : 5,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 5
}

This worked.

I did this...

curl -X GEThttp://localhost:9200

{
"ok" : true,
"name" : "Peepers",
"version" : {
"number" : "0.16.2",
"date" : "2011-05-31T23:43:18",
"snapshot_build" : false
},
"tagline" : "You Know, for Search",
"cover" : "DON'T PANIC",
"quote" : {
"book" : "The Hitchhiker's Guide to the Galaxy",
"chapter" : "Chapter 12",
"text1" : "If there's anything bigger than my ego around, I want
it caught a
nd shot now."
}
}

It worked.

I tried this...

curl -XPUT 'http://localhost:9200/twitter/user/kimchy'-d '{ "name" :
"Shay Ban

on" }'
curl: (1) Protocol 'http not supported or disabled in libcurl
curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

no luck.

I tried this (I took out the quotes from around the URL)...

curl -i -XPUThttp://localhost:9200/twitter/user/kimchy-d '{ "name" :
"Shay Ba

non" }'
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Content-Length: 260

{"error":"MapperParsingException[Failed to parse]; nested:
JsonParseException[
Unexpected character (''' (code 39)): expected a valid value (number,
String, array,
yobject, 'true', 'false' or 'null')\n at [Source: [B@8140ed; line: 1, column:2]]; ","
status":400}curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

oops

Can anyone tell me what I am doing wrong?

Thanks

Walter

Its a windows command line thing. Use " and """ where you want a ".

curl -XPUT "http://localhost:9200/twitter/user/kimchy" -d "{ """name""" :
"""Shay Banon""" }"

resulted in the following.

{"ok":true,"_index":"twitter","_type":"user","_id":"kimchy","_version":1}

Rich

-----Original Message-----
From: phpWalter
Sent: Saturday, June 04, 2011 12:08 AM
To: users
Subject: new windows install

Windows XP Pro
elasticsearch is 0.16.2

java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

  1. how do I make this an auto-start Service?

  2. running CURL

I did this...

curl -X GET http://localhost:9200/_cluster/health?pretty=true
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 5,
"active_shards" : 5,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 5
}

This worked.

I did this...

curl -X GET http://localhost:9200
{
"ok" : true,
"name" : "Peepers",
"version" : {
"number" : "0.16.2",
"date" : "2011-05-31T23:43:18",
"snapshot_build" : false
},
"tagline" : "You Know, for Search",
"cover" : "DON'T PANIC",
"quote" : {
"book" : "The Hitchhiker's Guide to the Galaxy",
"chapter" : "Chapter 12",
"text1" : "If there's anything bigger than my ego around, I want
it caught a
nd shot now."
}
}

It worked.

I tried this...

curl -XPUT 'http://localhost:9200/twitter/user/kimchy' -d '{ "name" : "Shay
Ban
on" }'
curl: (1) Protocol 'http not supported or disabled in libcurl
curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

no luck.

I tried this (I took out the quotes from around the URL)...

curl -i -XPUT http://localhost:9200/twitter/user/kimchy -d '{ "name" :
"Shay Ba
non" }'
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Content-Length: 260

{"error":"MapperParsingException[Failed to parse]; nested:
JsonParseException[
Unexpected character (''' (code 39)): expected a valid value (number,
String, array,
yobject, 'true', 'false' or 'null')\n at [Source: [B@8140ed; line: 1, column:2]]; ","
status":400}curl: (6) Could not resolve host: name; Host not found
curl: (6) Could not resolve host: :; Host not found
curl: (6) Could not resolve host: Shay Banon; Host not found

oops

Can anyone tell me what I am doing wrong?

Thanks

Walter

That worked great! Thank you!

May I suggest that the example docs reflect this for windows users?

Thank you Richard !

On Sun, Jun 5, 2011 at 7:46 AM, Richard Yeo richard.yeo@gmail.com wrote:

Its a windows command line thing. Use " and """ where you want a ".

curl -XPUT "http://localhost:9200/twitter/user/kimchy" -d "{ """name""" :
"""Shay Banon""" }"

resulted in the following.

{"ok":true,"_index":"twitter","_type":"user","_id":"kimchy","_version":1}

Rich

I think that would be a great idea.
Even better if it was a wiki and users could just update themselves.
This way the documentation would come up to speed very quickly
Rich

From: Walter Torres
Sent: Monday, June 06, 2011 10:42 PM
To: users@elasticsearch.com
Subject: Re: new windows install

That worked great! Thank you!

May I suggest that the example docs reflect this for windows users?

Thank you Richard !

On Sun, Jun 5, 2011 at 7:46 AM, Richard Yeo richard.yeo@gmail.com wrote:

Its a windows command line thing. Use " and """ where you want a ".

curl -XPUT "http://localhost:9200/twitter/user/kimchy" -d "{ """name""" : """Shay Banon""" }"

resulted in the following.

{"ok":true,"_index":"twitter","_type":"user","_id":"kimchy","_version":1}

Rich

Hi Richard

On Fri, 2011-06-10 at 17:20 +0100, Richard Yeo wrote:

I think that would be a great idea.
Even better if it was a wiki and users could just update themselves.
This way the documentation would come up to speed very quickly

Actually, the wiki was quite disorganised and difficult to control.

You can fork the elasticsearch docs and send pull requests, which are
gratefully received.

https://github.com/elasticsearch/elasticsearch.github.com

clint

Thanks for that info, it worked on windows, similarly i am trying to do

curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '
{
"user": "kimchy",
"postDate": "2009-11-15T13:12:00",
"message": "Trying out Elastic Search, so far so good?"
}'

by replacing as follows,

curl -XPUT "http://localhost:9200/twitter/tweet/1" -d "{ """user""" : """kimchy""", """postDate""" : """2012-08-15T14:12:12""", """message""" : """Another tweet, will it be indexed?"""}"

Its not working, showing Http not found.
Please let me know where i am wrong.