Hey Jorg,
Correct. Whew!
If I run just curl -XPOST
'localhost:9200/_push?map=\{"myindex":"myindexcopy"\}'
it works fine.
By the way : is there any way to make this work in "sense" eg
POST /_push?map=\{"myindex":"myindexcopy"\}
POST /_push
{
"map": {
""myindex":"myindexcopy"
}
}
The second one will submit in "sense" but results in empty map={}
And is there any plan to put a gui around it?
Aside: I still see these errors in the ES logs
[2014-10-22 13:46:25,736][INFO ][client.transport ] [Astronomer]
failed to get local cluster state for [#transport#-2][HDQWK037][inet[/10.193
org.elasticsearch.transport.RemoteTransportException: [Abigail
Brand][inet[/10.193.5.155:9301]][cluster/state]
Caused by: org.elasticsearch.transport.RemoteTransportException: [Abigail
Brand][inet[/10.193.5.155:9301]][cluster/state]
Caused by: java.lang.IndexOutOfBoundsException: Readable byte limit
exceeded: 48
at
org.elasticsearch.common.netty.buffer.AbstractChannelBuffer.readByte(AbstractChannelBuffer.java:236)
at
org.elasticsearch.transport.netty.ChannelBufferStreamInput.readByte(ChannelBufferStreamInput.java:132)
at
org.elasticsearch.common.io.stream.StreamInput.readVInt(StreamInput.java:141)
at
org.elasticsearch.common.io.stream.StreamInput.readString(StreamInput.java:272)
at
org.elasticsearch.common.io.stream.HandlesStreamInput.readString(HandlesStreamInput.java:61)
at
org.elasticsearch.common.io.stream.StreamInput.readStringArray(StreamInput.java:362)
at
org.elasticsearch.action.admin.cluster.state.ClusterStateRequest.readFrom(ClusterStateRequest.java:132)
at
org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209)
at
org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109)
at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at
org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
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:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
On Wednesday, October 22, 2014 1:27:59 PM UTC+1, Jörg Prante wrote:
> I think you have to set up such a curl command like this
>
> curl -XPOST
> 'localhost:9200/yourindex/_push?map=\{"yourindex":"yournewindex"\}'
>
> to push the index "yourindex" to another one. Note the endpoint.
>
> How does your curl look like?
>
> Jörg
>
> On Wed, Oct 22, 2014 at 1:27 PM, <[email protected] <javascript:>> wrote:
>
>> Jorg,
>>
>> Thanks for the quick turnaround on putting in the fix.
>>
>> What I found when I tested is that it works for test, testcopy
>>
>> But when I try with myindex, myindexcopy doesn't work
>>
>> I noticed in the logs when I was trying "myindex" that it was looking for
>> an index "test" which was a bit odd
>>
>> So I copied my "myindex" to an index named literally "test" and only
>> then it worked
>> So the only index that can be copied is "test"
>> The target index can be anything.
>>
>> Logs:
>>
>> [2014-10-22 12:05:07,649][INFO ][KnapsackPushAction ] start of
>> push:
>> {"mode":"push","started":"2014-10-22T11:05:07.648Z","node_name":"Pathway"}
>> [2014-10-22 12:05:07,649][INFO ][KnapsackService ] update
>> cluster settings: plugin.knapsack.export.state ->
>> [{"mode":"push","started":"2014-10-22T11:05:07.648Z","node_name":"Pathway"}]
>> [2014-10-22 12:05:07,650][INFO ][KnapsackPushAction ]
>> map={myindex=myindexcopy}
>> [2014-10-22 12:05:07,650][INFO ][KnapsackPushAction ] getting
>> settings for indices [test, myindex]
>> [2014-10-22 12:05:07,651][INFO ][KnapsackPushAction ] found
>> indices: [test, myindex]
>> [2014-10-22 12:05:07,652][INFO ][KnapsackPushAction ] getting
>> mappings for index test and types []
>> [2014-10-22 12:05:07,652][INFO ][KnapsackPushAction ] found
>> mappings: [test]
>> [2014-10-22 12:05:07,653][INFO ][KnapsackPushAction ] adding
>> mapping: test
>> [2014-10-22 12:05:07,653][INFO ][KnapsackPushAction ] creating
>> index: test
>> [2014-10-22 12:05:07,672][INFO ][KnapsackPushAction ] count=2
>> status=OK
>>
>> I guess you can put in a quick fix?
>>
>> I would have to ask if anyone is using this?
>>
>> And what are most people doing? Are there any plans by "ES" to create a
>> product or does the snapshot feature suffice for most people?
>>
>> Again I just would repeat my requirements: I want to change the mapping
>> types for an existing index. Therefore I create my new index and copy the
>> old index data into the new.
>>
>> Thanks in advance.
>>
>> On Monday, October 20, 2014 8:42:48 PM UTC+1, Jörg Prante wrote:
>>
>>> I admit there is something overcautious in the knapsack release to
>>> prevent overwriting existing data. I will add a fix that will allow writing
>>> into an empty index.
>>>
>>> https://github.com/jprante/elasticsearch-knapsack/issues/57
>>>
>>> Jörg
>>>
>>> On Mon, Oct 20, 2014 at 6:47 PM, <[email protected]> wrote:
>>>
>>>> By the way
>>>> Es version 1.3.4
>>>> Knapsack version built with 1.3.4
>>>>
>>>>
>>>> Regards.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "elasticsearch" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/elasticsearch/e69c6778-cbc5-4e56-bf71-9bac56b66942%
>>>> 40googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/2ff794cd-c1bf-463f-81f1-ce9a20da3b6e%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/elasticsearch/2ff794cd-c1bf-463f-81f1-ce9a20da3b6e%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/d92a58b0-4a3c-4d29-8e5b-50f382a93092%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.