Re: copy index

2014-10-22 Thread joergpra...@gmail.com
I can not use the HTTP request body because this is reserved for a search request like in the _search endpoint. So you can push a part of the index to a new index (the search hits). The message "failed to get local cluster state for" is on INFO level, so I think it is not an error. A GUI is a lon

Re: copy index

2014-10-22 Thread eunever32
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 se

Re: copy index

2014-10-22 Thread joergpra...@gmail.com
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, wrote: > Jorg, > > Tha

Re: copy index

2014-10-22 Thread joergpra...@gmail.com
Yes, I can put up a fix - looks weird. Most users have either a constant mapping that can extend dynamically, or does not change on existing field. If fields have to change for future documents, you can also change mapping by using alias technique: - old index with old fields (no change) - new

Re: copy index

2014-10-22 Thread eunever32
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

Re: copy index

2014-10-20 Thread joergpra...@gmail.com
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, wrote: > By the way > Es version

Re: copy index

2014-10-20 Thread eunever32
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 elasticsearch+unsubscr...@googlegroups

Re: copy index

2014-10-20 Thread eunever32
Okay when I try that I get this error. It's always at byte 48 Thanks in advance Caused by: java.lang.IndexOutOfBoundsException: Readable byte limit exceeded: 48 at org.elasticsearch.common.netty.buffer.AbstractChannelBuffer.readByte(AbstractChannelBuffer.java:236) at org.elasticsearch.transp

Re: copy index

2014-10-20 Thread joergpra...@gmail.com
The recipe is something like this 1. install knapsack 2. create new index. Example curl -XPUT 'localhost:9200/newindex' 3. create new mappings curl -XPUT 'localhost:9200/newindex/newmapping/_mapping' -d '{ ... }' 4. copy data curl -XPOST 'localhost:9200/oldindex/oldmapping/_push?map=\{"oldin

Re: copy index

2014-10-20 Thread eunever32
So just to explain what I want: - I want to be able to "push" an existing index to another index which has new mappings Is this possible? Preferably it wouldn't go through an intermediate file-system file: that would be expensive and might not be enough disk available. Thanks. On M

Re: copy index

2014-10-20 Thread joergpra...@gmail.com
There is no more parameter "createIndex", the documentation is outdated - sorry for the confusion. The "_push" action does not use files. There is no need to do that, this would be very strange, Jörg On Mon, Oct 20, 2014 at 5:12 PM, wrote: > Jorg, > > Not sure what you mean. There is a flag:

Re: copy index

2014-10-20 Thread eunever32
Jorg, Not sure what you mean. There is a flag: "createIndex=false" which means : if the index already exists do not try to create it ie it is pre-created. Import will handle this. Will _push also ? I have another question which affects me: I was hoping that "_push" would write to the index wi

Re: copy index

2014-10-19 Thread joergpra...@gmail.com
I never thought about something like "pre-creation" because it would just double the existing create index action... Jörg On Sun, Oct 19, 2014 at 6:00 PM, wrote: > OK I can try that > But is there an option in the _push to have a pre created index? > > I know it's possible with import createIn

Re: copy index

2014-10-19 Thread eunever32
OK I can try that But is there an option in the _push to have a pre created index? I know it's possible with import createIndex=false Would export/import be just as good? -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from thi

Re: copy index

2014-10-19 Thread joergpra...@gmail.com
A better idea than fiddling with mapping in the HTTP GET/POST parameter is to pre-create an empty target index like you want, and after that, push the docs with a knapsack command by the "map" parameter. I had also the idea to redesign the knapsack arguments from GET/POST parameter names to struct

Re: copy index

2014-10-18 Thread eunever32
Jorg, That is exactly the kind of thing I'm looking for. I'm having a little bit of difficulty getting it to do what I want. I want to "push" an index to another index and change the mapping. I can import / export okay but the push is having difficulty picking up the new mappings. The syntax

Re: copy index

2014-10-17 Thread joergpra...@gmail.com
You can use the knapsack plugin for export/import data and change mappings (and much more!) For a 1:1 online copy, just one curl command is necessary, yes. https://github.com/jprante/elasticsearch-knapsack Jörg On Thu, Oct 16, 2014 at 7:55 PM, wrote: > Hi > > I can see there are lots of utili

Re: copy index

2014-10-16 Thread eunever32
I should have mentioned: The point is to copy the data only And then to change the mappings Snapshot no use sorry because that brings the mappings -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiv

Re: copy index

2014-10-16 Thread Bobby Pilot
Have you tried taking a snapshot and restoring the index to a new name (see rename_pa

copy index

2014-10-16 Thread eunever32
Hi I can see there are lots of utilities to copy the contents of an index such as elasticdump reindexer streames etc And they mostly use scan scroll. Is there a single curl command to copy an index to a new index? Without too much investigation it looks like scan scroll requires repeated call

Re: Copy index from production to development instance

2014-06-26 Thread Himanshu Agrawal
>From the data you have provided I see that your bucket and keys for development and production are different. Point your development elasticsearch instance to the same AWS account and bucket in which you are storing the snapshot. On Jun 26, 2014 9:15 PM, "Brian Lamb" wrote: > Thank you for your

Re: Copy index from production to development instance

2014-06-26 Thread Brian Lamb
Thank you for your suggestion. I tried the stream2es library but I get a OutOfMemoryError when trying to use that. On Friday, June 6, 2014 5:13:19 PM UTC-4, Antonio Augusto Santos wrote: > > Take a look at stream2es https://github.com/elasticsearch/stream2es > > On Friday, June 6, 2014 2:13:06 PM

Re: Copy index from production to development instance

2014-06-06 Thread Antonio Augusto Santos
Take a look at stream2es https://github.com/elasticsearch/stream2es On Friday, June 6, 2014 2:13:06 PM UTC-3, Brian Lamb wrote: > > I should also point out that I had to edit a file in the metadata-snapshot > file to change around the s3 keys and bucket name to match what development > was expec

Re: Copy index from production to development instance

2014-06-06 Thread Brian Lamb
I should also point out that I had to edit a file in the metadata-snapshot file to change around the s3 keys and bucket name to match what development was expecting. On Friday, June 6, 2014 1:11:57 PM UTC-4, Brian Lamb wrote: > > Hi all, > > I want to do a one time copy of the data on my product

Copy index from production to development instance

2014-06-06 Thread Brian Lamb
Hi all, I want to do a one time copy of the data on my production elastic search instance to my development elastic search instance. Both are managed by AWS if that makes this easier. Here is what I tried: On production: curl -XPUT 'http://localhost:9200/_snapshot/my_s3_repository' -d '{ "