# ES integration with couchdb on windows

**URL:** <https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044>\
**Category:** Elasticsearch\
**Created:** [March 6, 2011, 10:18am UTC](https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044 "2011-03-06T10:18:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@jason](https://discuss.elastic.co/u/jason)\
**Post date:** [March 6, 2011, 10:18am UTC](https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044/1 "2011-03-06T10:18:23Z")

</div>

Hello everyone,

I installed elasticsearch and couchdb on Windows, and have followed  
the instructions on their website:

[http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)

I opened dos command prompt, and ran this command:

curl -XPUT '[http://couchdb-host:5984/testdb](http://couchdb-host:5984/testdb)

and then:

cd /path/to/elasticsearch/

./bin/plugin -install river-couchdb

However, when I am running the comand below:

C:\>curl -X PUT [http://localhost:9200/\_river/testdb/\_meta](http://localhost:9200/_river/testdb/_meta) -d  
'{"type":"couchdb",  
"couchdb":{"host":"localhost","port":  
5984,"db":"testdb","filter":null}}'

I am getting the following exception:

{"error":"MapperParsingException[Failed to parse]; nested:  
JsonParseException[Un  
expected character (''' (code 39)): expected a valid value (number,  
String, arra  
y, object, 'true', 'false' or 'null')\n at [Source: [B@1f10cca; line: 1, column: 2]]; ","status":400}

If anyone had experience in working with ES in Windows environment,  
can you please point out what I am doing wrong? I am completely new to  
ElasticSearch and will appreciate your assistance.

---

<div class="post-metadata">

**Author:** ![Dave\_Cottlehuber](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dave_cottlehuber/32/3045_2.png) [@Dave\_Cottlehuber](https://discuss.elastic.co/u/Dave_Cottlehuber)\
**Post date:** [March 6, 2011, 3:15pm UTC](https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044/2 "2011-03-06T15:15:58Z")

</div>

On 6 March 2011 23:18, eugene [efurman@gmail.com](mailto:efurman@gmail.com) wrote:

> Hello everyone,
> 
> I installed elasticsearch and couchdb on Windows, and have followed  
> the instructions on their website:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html)
> 
> I opened dos command prompt, and ran this command:
> 
> curl -XPUT '[http://couchdb-host:5984/testdb](http://couchdb-host:5984/testdb)
> 
> and then:
> 
> cd /path/to/elasticsearch/
> 
> ./bin/plugin -install river-couchdb
> 
> However, when I am running the comand below:
> 
> C:\>curl -X PUT [http://localhost:9200/\_river/testdb/\_meta](http://localhost:9200/_river/testdb/_meta) -d  
> '{"type":"couchdb",  
> "couchdb":{"host":"localhost","port":  
> 5984,"db":"testdb","filter":null}}'
> 
> I am getting the following exception:
> 
> {"error":"MapperParsingException[Failed to parse]; nested:  
> JsonParseException[Un  
> expected character (''' (code 39)): expected a valid value (number,  
> String, arra  
> y, object, 'true', 'false' or 'null')\n at [Source: [B@1f10cca; line: 1, column: 2]]; ","status":400}
> 
> If anyone had experience in working with ES in Windows environment,  
> can you please point out what I am doing wrong? I am completely new to  
> Elasticsearch and will appreciate your assistance.

Hi Eugene

Your quoting needs to be sorted out a la  
[http://wiki.apache.org/couchdb/Quirks\_on\_Windows](http://wiki.apache.org/couchdb/Quirks_on_Windows) it's not unix so  
'{....}' doesn't get through the shell unmangled.

Put your json in a file foo.json:  
{  
"couchdb": {  
"port": 5984,  
"filter": null,  
"db": "testdb",  
"host": "localhost"  
},  
"type": "couchdb"  
}

and try this instead:

curl --verbose --header "Content-Type: application/json" --data  
@foo.json --request PUT [http://localhost:9200/\_river/testdb/\_meta](http://localhost:9200/_river/testdb/_meta)

The alternative is to use ^" but it gets really messy really quick.

BTW DOS is an 8 bit OS..... you're using the command shell now 😉

In Figure 2.3, the command name describes the action to be performed,  
while the arguments provide additional information needed to carry out  
this action. The syntax of the command arguments is specific to each  
command. However, there are a number of well-established conventions  
for command argument syntax. These are only conventions, however, and  
each individual command is free to interpret the supplied arguments  
however it chooses:

```
First, multiple arguments are normally separated from one another

```

by spaces. In Figure 2.3, the command has three arguments, c:\*.bak,  
e:\backup, and /s. Occasionally, other characters are used as argument  
separators. For example, the COPY command can use + characters to  
separate multiple filenames.

```
Second, any argument that contains spaces or begins or ends with

```

spaces must be enclosed in double quotes. This is particularly  
important when using long file and directory names, which frequently  
contain one or more spaces. If a double-quoted argument itself  
contains a double quote character, the double quote must be doubled.  
For example, enter "Quoted" Argument as """Quoted"" Argument".

```
Third, command switches always begin with a slash / character. A

```

switch is an argument that modifies the operation of the command in  
some way. Occasionally, switches begin with a + or - character. Some  
switches are global, and affect the command regardless of their  
position in the argument list. Other switches are local, and affect  
specific arguments (such as the one immediately preceding the switch).

```
Fourth, all reserved shell characters not in double quotes must be

```

escaped. These characters have special meaning to the Windows NT  
command shell. The reserved shell characters are:

```
& | ( ) < > ^

To pass reserved shell characters as part of an argument for a

```

command, either the entire argument must be enclosed in double quotes,  
or the reserved character must be escaped. Prefix a reserved character  
with a carat (^) character to escape it. For example, the following  
command example will not work as expected, because \< and \> are  
reserved shell characters:

```
1. C:\>echo <dir>
 2. The syntax of the command is incorrect.

Instead, escape the two reserved characters, as follows:

1. C:\>echo ^<dir^>
 2. <dir>

Typically, the reserved shell characters are not used in commands,

```

so collisions that require the use of escapes are rare. They do occur,  
however. For example, the popular PKZIP program supports a -& switch  
to enable disk spanning. To use this switch correctly under Windows  
NT, -^& must be typed.

```
Tip The carat character is itself a reserved shell character.

```

Thus, to type a carat character as part of a command argument, type  
two carats instead. Escaping is necessary only when the normal shell  
interpretation of reserved characters must be bypassed.

```
Finally, the maximum allowed length of a shell command appears to

```

be undocumented by Microsoft. Simple testing shows that the Windows NT  
command shell allows very long commands—in excess of 4,000 characters.  
Practically speaking, there is no significant upper limit to the  
length of a command.

[from [The Windows NT Command Shell | Microsoft Learn](http://technet.microsoft.com/en-us/library/cc723564.aspx)]

Cheers  
Dave

---

<div class="post-metadata">

**Author:** ![jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@jason](https://discuss.elastic.co/u/jason)\
**Post date:** [March 6, 2011, 6:53pm UTC](https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044/3 "2011-03-06T18:53:43Z")

</div>

Dave,

Thank you very much. Your command worked!

Now I would like to be able to test service request using ES. In my  
command shell, I am running:

> curl -X GET [http://localhost:9200/testdb](http://localhost:9200/testdb)

and getting the error below:

No handler found for uri [/testdb] and method [GET]

Am I still missing something, or I have to provide different url? Thank you  
in advance.

-Eugene.

--  
View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/ES-integration-with-couchdb-on-windows-tp2641279p2642719.html](http://elasticsearch-users.115913.n3.nabble.com/ES-integration-with-couchdb-on-windows-tp2641279p2642719.html)  
Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@jason](https://discuss.elastic.co/u/jason)\
**Post date:** [March 6, 2011, 7:42pm UTC](https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044/4 "2011-03-06T19:42:45Z")

</div>

Dave,

Thank you very much. Your command worked!

Now I would like to be able to test service request using ES. In my  
command shell, I am running:

> curl -X GET [http://localhost:9200/testdb](http://localhost:9200/testdb)

and getting the error below:

No handler found for uri [/testdb] and method [GET]

Am I still missing something, or I have to provide different url? Thank you  
in advance.

-Eugene.

--  
View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/ES-integration-with-couchdb-on-windows-tp2641279p2642905.html](http://elasticsearch-users.115913.n3.nabble.com/ES-integration-with-couchdb-on-windows-tp2641279p2642905.html)  
Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@jason](https://discuss.elastic.co/u/jason)\
**Post date:** [March 6, 2011, 7:43pm UTC](https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044/5 "2011-03-06T19:43:31Z")

</div>

Dave,

Thank you very much. Your command worked!

Now I would like to be able to test service request using ES. In my  
command shell, I am running:

> curl -X GET [http://localhost:9200/testdb](http://localhost:9200/testdb)

and getting the error below:

No handler found for uri [/testdb] and method [GET]

Am I still missing something, or I have to provide different url? Thank you  
in advance.

-Eugene.

--  
View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/ES-integration-with-couchdb-on-windows-tp2641279p2642908.html](http://elasticsearch-users.115913.n3.nabble.com/ES-integration-with-couchdb-on-windows-tp2641279p2642908.html)  
Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@jason](https://discuss.elastic.co/u/jason)\
**Post date:** [March 6, 2011, 7:48pm UTC](https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044/6 "2011-03-06T19:48:43Z")

</div>

Dave,

Thank you very much. Your command worked!

Now I would like to be able to test service request using ES. In my  
shell command, I am running:

> curl -X GET [http://localhost:9200/testdb](http://localhost:9200/testdb)

and getting the error below:

No handler found for uri [/testdb] and method [GET]

Am I still missing something, or I have to provide different url?  
Thank you in advance.

-Eugene.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:10am UTC](https://discuss.elastic.co/t/es-integration-with-couchdb-on-windows/4044/7 "2017-07-06T04:10:41Z")

</div>


