Issue 1:
ES version: 1.4.4.

One of our clients is running ES in a virtual server (OVH VPS).

From what I understand, ElasticSearch stopped working after one hour with the following error.

This error was repeated a couple of times at the end of the log file, then the whole VM crashed.

[2015-04-13 06:02:13,567][WARN ][netty.channel.socket.nio.AbstractNioSelector] Unexpected exception in the selector loop.
java.lang.LinkageError: loader constraint violation: when resolving method "java.nio.channels.Selector.wakeup()Ljava/nio/channels/Selector;" the class loader (instance of sun/misc/Launcher$AppClassLoader) of the current class, org/elasticsearch/common/netty/channel/socket/nio/AbstractNioSelector, and the class loader (instance of <bootloader>) for the method's defining class, java/nio/channels/Selector, have different Class objects for the type java/nio/channels/Selector used in the signature
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[2015-04-13 06:02:13,568][WARN ][netty.channel.socket.nio.AbstractNioSelector] Unexpected exception in the selector loop.
java.lang.LinkageError: loader constraint violation: when resolving method "java.nio.channels.Selector.wakeup()Ljava/nio/channels/Selector;" the class loader (instance of sun/misc/Launcher$AppClassLoader) of the current class, org/elasticsearch/common/netty/channel/socket/nio/AbstractNioSelector, and the class loader (instance of <bootloader>) for the method's defining class, java/nio/channels/Selector, have different Class objects for the type java/nio/channels/Selector used in the signature
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[2015-04-13 06:02:13,609][WARN ][netty.util.HashedWheelTimer] An exception was thrown by TimerTask.
java.lang.LinkageError: loader constraint violation: when resolving method "java.nio.channels.Selector.wakeup()Ljava/nio/channels/Selector;" the class loader (instance of sun/misc/Launcher$AppClassLoader) of the current class, org/elasticsearch/common/netty/channel/socket/nio/NioClientBoss$1, and the class loader (instance of <bootloader>) for the method's defining class, java/nio/channels/Selector, have different Class objects for the type java/nio/channels/Selector used in the signature
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss$1.run(NioClientBoss.java:54)
at org.elasticsearch.common.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:556)
at org.elasticsearch.common.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:632)
at org.elasticsearch.common.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:369)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at java.lang.Thread.run(Thread.java:745)
[2015-04-13 06:02:23,566][WARN ][transport.netty ] [Linkurious Index] exception caught on transport layer [[id: 0x5f0a5b48]], closing connection
java.lang.LinkageError: loader constraint violation: when resolving method "java.nio.channels.Selector.wakeup()Ljava/nio/channels/Selector;" the class loader (instance of sun/misc/Launcher$AppClassLoader) of the current class, org/elasticsearch/common/netty/channel/socket/nio/AbstractNioSelector, and the class loader (instance of <bootloader>) for the method's defining class, java/nio/channels/Selector, have different Class objects for the type java/nio/channels/Selector used in the signature
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.registerTask(AbstractNioSelector.java:115)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.register(AbstractNioSelector.java:105)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.register(NioClientBoss.java:42)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:121)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:574)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:634)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:207)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:788)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:741)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:714)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:150)
at org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Issue 2:
When I create multiple documents which have the same output value in the completion field, a suggest completion request only retrieves one object.

I guess it is a feature, however, once we may set different payloads to those documents, it would make sense to retrieve multiple suggestions with the same output.

My environment settings:

ElasticSearch version number: 1.0.0.Beta1

Lucene version: 4.5.1

In the following example, I create an index with two documents. Each document has a different value in the payload, but the same output and input.

Performing a suggestion completion request, only one document is retrieved.

Scripts:

Create and populate index

curl -XDELETE 'localhost:9200/notebookindex'

curl -XPUT localhost:9200/notebookindex

curl -XPUT localhost:9200/notebookindex/friend/_mapping -d '{
"friend" : {
"properties" : {
"name" : { "type" : "string" },
"suggestField" : { "type" : "completion", "payloads" : true }
}
}
}'

curl -XPUT 'localhost:9200/notebookindex/friend/1' -d ' {
"name": "james smith",
"suggestField": {
"input": ["james", "smith", "james smith"],
"output": "james smith",
"payload": {"id": "1", "phone": "555-55555"}
}
}'

curl -XPUT 'localhost:9200/notebookindex/friend/2' -d '{
"name": "james smith",
"suggestField": {
"input": ["james", "smith", "james smith"],
"output": "james smith",
"payload": {"id": "2", "phone": "444-44444"}
}
}'

Search 1: look for friends starting with j

curl -XPOST 'localhost:9200/notebookindex/_suggest?pretty' -d '{
"my-friends-suggest": {
"text": "j",
"completion": {
"field": "suggestField"
}
}
}'

Only one James is found, even though there are two documents matching the suggestion.

{
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"my-friends-suggest" : [ {
"text" : "j",
"offset" : 0,
"length" : 1,
"options" : [ {
"text" : "james smith",
"score" : 1.0, "payload" : {"id":"2","phone":"444-44444"}
} ]
} ]
}

Removal and Search 2: remove the James (id 2) previously found and look for friends starting with j

curl -XDELETE 'localhost:9200/notebookindex/friend/2'

curl -XPOST 'localhost:9200/notebookindex/_suggest?pretty' -d '{
"my-friends-suggest": {
"text": "j",
"completion": {
"field": "suggestField"
}
}
}'

The other James is found.

{
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"my-friends-suggest" : [ {
"text" : "j",
"offset" : 0,
"length" : 1,
"options" : [ {
"text" : "james smith",
"score" : 1.0, "payload" : {"id":"1","phone":"555-55555"}
} ]
} ]
}