Question: I have ElasticSearch 2.2 running on a linux VM. I'm running ManifoldCF 2.3 on another VM in the same netowrk. Using ManifoldCF's browser UI I added the ElasticSearch output connector and when I save it I get an error in the connector status: 

```
Name:   Elastic 
Description:   Elastic search 
Connection type:    ElasticSearch   
Max connections:    10 
Server Location (URL):  http://<IP_ADDRESS>:9200 
Index name: index 
Index type: sharepoint 
Use mapper-attachments: false 
Content field name: contentfield 
Connection status:  ERROR "root_cause":["type":"illegal_argument_exception"

```

Any ideas?

Answer: 
You are passing an `array` of strings to jQuery's `append` method. Simply join it first:

```
jQuery('.place').append(top.join(''));

```

When you call `toString()` on an array (which is what jQuery is doing here when you try to `append` an array of strings) it casts each array element to a string and puts a comma between them:

```
[1,2,3].toString(); //"1,2,3"
[{a:"b"},2,3].toString(); //"[object Object],2,3"

```
First of all it looks there's a problem using `top` as variable name, so I changed it to top1.

THEORY:
According to <http://api.jquery.com/append/> you can pass an array of DOM elements, or String(s) (or other things, but they're not related to the question). You seem to pass an array of strings, that is not an array of DOM elements, so it's being stringified, and the stringification of an array has commas between the elements. I'm pretty sure you also have a "[" before them and a "]" after them.

PRACTICE: Well, I don't seem to reproduce your problem (at least in Chrome, FF, Safari):

```js
var top1 = [];

for (var i = 0; i < 2; i++) {                                                   
    var file = "<div>something[i]</div>";
    top1.push(file);     
}

$('#place').append(top1);
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="place"> 
</div>
```