# Migrate lucene index into elasticsearch

**URL:** <https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924>\
**Category:** Elasticsearch\
**Created:** [September 4, 2012, 1:44pm UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924 "2012-09-04T13:44:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthias\_Kricke](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Matthias\_Kricke](https://discuss.elastic.co/u/Matthias_Kricke)\
**Post date:** [September 4, 2012, 1:44pm UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/1 "2012-09-04T13:44:26Z")

</div>

Hi,

I want, for some reason, to migrate my lucene index into an existing  
elasticsearch cluster. Is there a way to do so?

Greetings and thanks for your responses,  
MK

--

---

<div class="post-metadata">

**Author:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [September 4, 2012, 1:46pm UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/2 "2012-09-04T13:46:48Z")

</div>

Hello!

In addition to Lucene files there are also additional information needed by ElasticSearch. So this won't be simple if possible at all.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - Nutch - ElasticSearch_

Hi,

I want, for some reason, to migrate my lucene index into an existing elasticsearch cluster. Is there a way to do so?

Greetings and thanks for your responses,

MK

--

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [September 4, 2012, 11:46pm UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/3 "2012-09-04T23:46:28Z")

</div>

Hi,

That said, Matthias could write a simple Java app that reads documents from  
a Lucene index - assuming all fields were stored and not just indexed - and  
index them into a newly set up ES cluster.

## Otis

Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
Scalable Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Tuesday, September 4, 2012 9:46:57 AM UTC-4, Rafał Kuć wrote:

> Hello!
> 
> In addition to Lucene files there are also additional information needed  
> by Elasticsearch. So this won't be simple if possible at all.
> 
> \*--  
> Regards,  
> Rafał Kuć  
> Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> - 
> 
> Hi,
> 
> I want, for some reason, to migrate my lucene index into an existing  
> elasticsearch cluster. Is there a way to do so?
> 
> ## Greetings and thanks for your responses, MK

--

---

<div class="post-metadata">

**Author:** ![Matthias\_Kricke](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Matthias\_Kricke](https://discuss.elastic.co/u/Matthias_Kricke)\
**Post date:** [September 5, 2012, 1:45pm UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/4 "2012-09-05T13:45:45Z")

</div>

I need performance. My tests show that inserting into Elasticsearch is six  
times slower than inserting into lucene.  
therefor I have an approach where i insert document into lucene and try to  
use those indices in Elasticsearch.

next problem seems to be an blocking operation which steals the performance  
of multi threaded inserting.

Would be glad to hear performance oriented answers.

Greetings,  
MK

Am Mittwoch, 5. September 2012 01:46:28 UTC+2 schrieb Otis Gospodnetic:

> Hi,
> 
> That said, Matthias could write a simple Java app that reads documents  
> from a Lucene index - assuming all fields were stored and not just indexed
> 
> - and index them into a newly set up ES cluster.
> 
> ## Otis
> 
> Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
> Scalable Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)
> 
> On Tuesday, September 4, 2012 9:46:57 AM UTC-4, Rafał Kuć wrote:
> 
> > Hello!
> > 
> > In addition to Lucene files there are also additional information needed  
> > by Elasticsearch. So this won't be simple if possible at all.
> > 
> > \*--  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > Elasticsearch
> > 
> > - 
> > 
> > Hi,
> > 
> > I want, for some reason, to migrate my lucene index into an existing  
> > elasticsearch cluster. Is there a way to do so?
> > 
> > ## Greetings and thanks for your responses, MK

--

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [September 6, 2012, 11:59pm UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/5 "2012-09-06T23:59:36Z")

</div>

Hi Matthias,

ES will always be slower than Lucene because it has more stuff happening on  
top of Lucene. Whether it's 6x or 1.1x times depends on what exactly one  
is indexing/searching, how are things tuned, etc.

## Otis

Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
Scalable Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Wednesday, September 5, 2012 9:45:45 AM UTC-4, Matthias Kricke wrote:

> I need performance. My tests show that inserting into Elasticsearch is  
> six times slower than inserting into lucene.  
> therefor I have an approach where i insert document into lucene and try to  
> use those indices in Elasticsearch.
> 
> next problem seems to be an blocking operation which steals the  
> performance of multi threaded inserting.
> 
> Would be glad to hear performance oriented answers.
> 
> Greetings,  
> MK
> 
> Am Mittwoch, 5. September 2012 01:46:28 UTC+2 schrieb Otis Gospodnetic:
> 
> > Hi,
> > 
> > That said, Matthias could write a simple Java app that reads documents  
> > from a Lucene index - assuming all fields were stored and not just indexed
> > 
> > - and index them into a newly set up ES cluster.
> > 
> > ## Otis
> > 
> > Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
> > Scalable Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)
> > 
> > On Tuesday, September 4, 2012 9:46:57 AM UTC-4, Rafał Kuć wrote:
> > 
> > > Hello!
> > > 
> > > In addition to Lucene files there are also additional information needed  
> > > by Elasticsearch. So this won't be simple if possible at all.
> > > 
> > > \*--  
> > > Regards,  
> > > Rafał Kuć  
> > > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > > Elasticsearch
> > > 
> > > - 
> > > 
> > > Hi,
> > > 
> > > I want, for some reason, to migrate my lucene index into an existing  
> > > elasticsearch cluster. Is there a way to do so?
> > > 
> > > ## Greetings and thanks for your responses, MK

--

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [September 7, 2012, 7:33am UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/6 "2012-09-07T07:33:51Z")

</div>

Hi Matthias,

as Otis said, setup on the ES side can be optimized for faster indexing  
(default settings work quite well but it can be updated for a short period  
of time for improved indexing speed). For example, you can disable  
replicas, disable refresh and use bulk request. After you are done with  
indexing you can increase number of replicas and allow refresh and possibly  
optimize index for best search performance.

For example, check "Bulk Indexing Usage" here for some tips

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Just saying that indexing in ES will be always slower compared to pure  
Lucene might be too general (up to incorrect). For example by default ES  
divides index into 5 shards, which means 5 independent Lucene indices which  
it indexes into in parallel. This could be faster compared to indexing into  
single Lucene index, no?

Regards,  
Lukas

On Fri, Sep 7, 2012 at 1:59 AM, Otis Gospodnetic \<[otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com)

> wrote:

> Hi Matthias,
> 
> ES will always be slower than Lucene because it has more stuff happening  
> on top of Lucene. Whether it's 6x or 1.1x times depends on what exactly  
> one is indexing/searching, how are things tuned, etc.
> 
> ## Otis
> 
> Search Analytics - [http://sematext.com/search-\*\*analytics/index.html](http://sematext.com/search-**analytics/index.html)[http://sematext.com/search-analytics/index.html](http://sematext.com/search-analytics/index.html)  
> Scalable Performance Monitoring - [http://sematext.com/spm/index.\*\*html](http://sematext.com/spm/index.**html)[http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)
> 
> On Wednesday, September 5, 2012 9:45:45 AM UTC-4, Matthias Kricke wrote:
> 
> > I need performance. My tests show that inserting into Elasticsearch is  
> > six times slower than inserting into lucene.  
> > therefor I have an approach where i insert document into lucene and try  
> > to use those indices in Elasticsearch.
> > 
> > next problem seems to be an blocking operation which steals the  
> > performance of multi threaded inserting.
> > 
> > Would be glad to hear performance oriented answers.
> > 
> > Greetings,  
> > MK
> > 
> > Am Mittwoch, 5. September 2012 01:46:28 UTC+2 schrieb Otis Gospodnetic:
> > 
> > > Hi,
> > > 
> > > That said, Matthias could write a simple Java app that reads documents  
> > > from a Lucene index - assuming all fields were stored and not just indexed
> > > 
> > > - and index them into a newly set up ES cluster.
> > > 
> > > ## Otis
> > > 
> > > Search Analytics - [http://sematext.com/search-\*\*analytics/index.html](http://sematext.com/search-**analytics/index.html)[http://sematext.com/search-analytics/index.html](http://sematext.com/search-analytics/index.html)  
> > > Scalable Performance Monitoring - [http://sematext.com/spm/index.\*\*html](http://sematext.com/spm/index.**html)[http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)
> > > 
> > > On Tuesday, September 4, 2012 9:46:57 AM UTC-4, Rafał Kuć wrote:
> > > 
> > > > Hello!
> > > > 
> > > > In addition to Lucene files there are also additional information  
> > > > needed by Elasticsearch. So this won't be simple if possible at all.
> > > > 
> > > > \*--  
> > > > Regards,  
> > > > Rafał Kuć  
> > > > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > > > Elasticsearch
> > > > 
> > > > - 
> > > > 
> > > > Hi,
> > > > 
> > > > I want, for some reason, to migrate my lucene index into an existing  
> > > > elasticsearch cluster. Is there a way to do so?
> > > > 
> > > > ## Greetings and thanks for your responses, MK
> > > 
> > > --

--

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [September 7, 2012, 7:46am UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/7 "2012-09-07T07:46:17Z")

</div>

May be one more note, not only how you tune ES can influence the indexing  
speed. External system factors are important as well, for example how much  
memory ES and the indexing job has.

On Fri, Sep 7, 2012 at 9:33 AM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi Matthias,
> 
> as Otis said, setup on the ES side can be optimized for faster indexing  
> (default settings work quite well but it can be updated for a short period  
> of time for improved indexing speed). For example, you can disable  
> replicas, disable refresh and use bulk request. After you are done with  
> indexing you can increase number of replicas and allow refresh and possibly  
> optimize index for best search performance.
> 
> For example, check "Bulk Indexing Usage" here for some tips  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html)
> 
> Just saying that indexing in ES will be always slower compared to pure  
> Lucene might be too general (up to incorrect). For example by default ES  
> divides index into 5 shards, which means 5 independent Lucene indices which  
> it indexes into in parallel. This could be faster compared to indexing into  
> single Lucene index, no?
> 
> Regards,  
> Lukas
> 
> On Fri, Sep 7, 2012 at 1:59 AM, Otis Gospodnetic \<  
> [otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com)\> wrote:
> 
> > Hi Matthias,
> > 
> > ES will always be slower than Lucene because it has more stuff happening  
> > on top of Lucene. Whether it's 6x or 1.1x times depends on what exactly  
> > one is indexing/searching, how are things tuned, etc.
> > 
> > ## Otis
> > 
> > Search Analytics - [http://sematext.com/search-\*\*analytics/index.html](http://sematext.com/search-**analytics/index.html)[http://sematext.com/search-analytics/index.html](http://sematext.com/search-analytics/index.html)  
> > Scalable Performance Monitoring - [http://sematext.com/spm/index.\*\*html](http://sematext.com/spm/index.**html)[http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)
> > 
> > On Wednesday, September 5, 2012 9:45:45 AM UTC-4, Matthias Kricke wrote:
> > 
> > > I need performance. My tests show that inserting into Elasticsearch is  
> > > six times slower than inserting into lucene.  
> > > therefor I have an approach where i insert document into lucene and try  
> > > to use those indices in Elasticsearch.
> > > 
> > > next problem seems to be an blocking operation which steals the  
> > > performance of multi threaded inserting.
> > > 
> > > Would be glad to hear performance oriented answers.
> > > 
> > > Greetings,  
> > > MK
> > > 
> > > Am Mittwoch, 5. September 2012 01:46:28 UTC+2 schrieb Otis Gospodnetic:
> > > 
> > > > Hi,
> > > > 
> > > > That said, Matthias could write a simple Java app that reads documents  
> > > > from a Lucene index - assuming all fields were stored and not just indexed
> > > > 
> > > > - and index them into a newly set up ES cluster.
> > > > 
> > > > ## Otis
> > > > 
> > > > Search Analytics - [http://sematext.com/search-\*\*analytics/index.html](http://sematext.com/search-**analytics/index.html)[http://sematext.com/search-analytics/index.html](http://sematext.com/search-analytics/index.html)  
> > > > Scalable Performance Monitoring - [http://sematext.com/spm/index.\*\*html](http://sematext.com/spm/index.**html)[http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)
> > > > 
> > > > On Tuesday, September 4, 2012 9:46:57 AM UTC-4, Rafał Kuć wrote:
> > > > 
> > > > > Hello!
> > > > > 
> > > > > In addition to Lucene files there are also additional information  
> > > > > needed by Elasticsearch. So this won't be simple if possible at all.
> > > > > 
> > > > > \*--  
> > > > > Regards,  
> > > > > Rafał Kuć  
> > > > > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > > > > Elasticsearch
> > > > > 
> > > > > - 
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I want, for some reason, to migrate my lucene index into an existing  
> > > > > elasticsearch cluster. Is there a way to do so?
> > > > > 
> > > > > ## Greetings and thanks for your responses, MK
> > > > 
> > > > --

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 7, 2012, 7:57am UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/8 "2012-09-07T07:57:18Z")

</div>

Agree.

I think Otis was comparing Lucene with ES on one node with 1 shard. In that case, Lucene will be always faster.

ES bring so much features (horizontal scaling, replicas, sharding, ...) that we could forget the overhead cost!

My 2 cents

😉

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 7 sept. 2012 à 09:33, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) a écrit :

> Hi Matthias,
> 
> as Otis said, setup on the ES side can be optimized for faster indexing (default settings work quite well but it can be updated for a short period of time for improved indexing speed). For example, you can disable replicas, disable refresh and use bulk request. After you are done with indexing you can increase number of replicas and allow refresh and possibly optimize index for best search performance.
> 
> For example, check "Bulk Indexing Usage" here for some tips [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html)
> 
> Just saying that indexing in ES will be always slower compared to pure Lucene might be too general (up to incorrect). For example by default ES divides index into 5 shards, which means 5 independent Lucene indices which it indexes into in parallel. This could be faster compared to indexing into single Lucene index, no?
> 
> Regards,  
> Lukas
> 
> On Fri, Sep 7, 2012 at 1:59 AM, Otis Gospodnetic [otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com) wrote:  
> Hi Matthias,
> 
> ES will always be slower than Lucene because it has more stuff happening on top of Lucene. Whether it's 6x or 1.1x times depends on what exactly one is indexing/searching, how are things tuned, etc.
> 
> ## Otis
> 
> Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
> Scalable Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)
> 
> On Wednesday, September 5, 2012 9:45:45 AM UTC-4, Matthias Kricke wrote:  
> I need performance. My tests show that inserting into Elasticsearch is six times slower than inserting into lucene.  
> therefor I have an approach where i insert document into lucene and try to use those indices in Elasticsearch.
> 
> next problem seems to be an blocking operation which steals the performance of multi threaded inserting.
> 
> Would be glad to hear performance oriented answers.
> 
> Greetings,  
> MK
> 
> Am Mittwoch, 5. September 2012 01:46:28 UTC+2 schrieb Otis Gospodnetic:  
> Hi,
> 
> That said, Matthias could write a simple Java app that reads documents from a Lucene index - assuming all fields were stored and not just indexed - and index them into a newly set up ES cluster.
> 
> ## Otis
> 
> Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
> Scalable Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)
> 
> On Tuesday, September 4, 2012 9:46:57 AM UTC-4, Rafał Kuć wrote:  
> Hello!
> 
> In addition to Lucene files there are also additional information needed by Elasticsearch. So this won't be simple if possible at all.
> 
> --  
> Regards,  
> Rafał Kuć  
> Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - Elasticsearch
> 
> Hi,
> 
> I want, for some reason, to migrate my lucene index into an existing elasticsearch cluster. Is there a way to do so?
> 
> ## Greetings and thanks for your responses, MK
> 
> --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Matthias\_Kricke](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Matthias\_Kricke](https://discuss.elastic.co/u/Matthias_Kricke)\
**Post date:** [September 7, 2012, 8:08am UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/9 "2012-09-07T08:08:40Z")

</div>

Thanks for your answers. I will try different approaches to improve the  
write performance.

Regards,  
MK

Am Freitag, 7. September 2012 09:57:28 UTC+2 schrieb David Pilato:

> Agree.
> 
> I think Otis was comparing Lucene with ES on one node with 1 shard. In  
> that case, Lucene will be always faster.
> 
> ES bring so much features (horizontal scaling, replicas, sharding, ...)  
> that we could forget the overhead cost!
> 
> My 2 cents
> 
> 😉
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 7 sept. 2012 à 09:33, Lukáš Vlček \<[lukas...@gmail.com](mailto:lukas...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hi Matthias,
> 
> as Otis said, setup on the ES side can be optimized for faster indexing  
> (default settings work quite well but it can be updated for a short period  
> of time for improved indexing speed). For example, you can disable  
> replicas, disable refresh and use bulk request. After you are done with  
> indexing you can increase number of replicas and allow refresh and possibly  
> optimize index for best search performance.
> 
> For example, check "Bulk Indexing Usage" here for some tips  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html)
> 
> Just saying that indexing in ES will be always slower compared to pure  
> Lucene might be too general (up to incorrect). For example by default ES  
> divides index into 5 shards, which means 5 independent Lucene indices which  
> it indexes into in parallel. This could be faster compared to indexing into  
> single Lucene index, no?
> 
> Regards,  
> Lukas
> 
> On Fri, Sep 7, 2012 at 1:59 AM, Otis Gospodnetic \<[otis.gos...@gmail.com](mailto:otis.gos...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi Matthias,
> > 
> > ES will always be slower than Lucene because it has more stuff happening  
> > on top of Lucene. Whether it's 6x or 1.1x times depends on what exactly  
> > one is indexing/searching, how are things tuned, etc.
> > 
> > ## Otis
> > 
> > Search Analytics - [http://sematext.com/search-\*\*analytics/index.html](http://sematext.com/search-**analytics/index.html)[http://sematext.com/search-analytics/index.html](http://sematext.com/search-analytics/index.html)  
> > Scalable Performance Monitoring - [http://sematext.com/spm/index.\*\*html](http://sematext.com/spm/index.**html)[http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)
> > 
> > On Wednesday, September 5, 2012 9:45:45 AM UTC-4, Matthias Kricke wrote:
> > 
> > > I need performance. My tests show that inserting into Elasticsearch is  
> > > six times slower than inserting into lucene.  
> > > therefor I have an approach where i insert document into lucene and try  
> > > to use those indices in Elasticsearch.
> > > 
> > > next problem seems to be an blocking operation which steals the  
> > > performance of multi threaded inserting.
> > > 
> > > Would be glad to hear performance oriented answers.
> > > 
> > > Greetings,  
> > > MK
> > > 
> > > Am Mittwoch, 5. September 2012 01:46:28 UTC+2 schrieb Otis Gospodnetic:
> > > 
> > > > Hi,
> > > > 
> > > > That said, Matthias could write a simple Java app that reads documents  
> > > > from a Lucene index - assuming all fields were stored and not just indexed
> > > > 
> > > > - and index them into a newly set up ES cluster.
> > > > 
> > > > ## Otis
> > > > 
> > > > Search Analytics - [http://sematext.com/search-\*\*analytics/index.html](http://sematext.com/search-**analytics/index.html)[http://sematext.com/search-analytics/index.html](http://sematext.com/search-analytics/index.html)  
> > > > Scalable Performance Monitoring - [http://sematext.com/spm/index.\*\*html](http://sematext.com/spm/index.**html)[http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)
> > > > 
> > > > On Tuesday, September 4, 2012 9:46:57 AM UTC-4, Rafał Kuć wrote:
> > > > 
> > > > > Hello!
> > > > > 
> > > > > In addition to Lucene files there are also additional information  
> > > > > needed by Elasticsearch. So this won't be simple if possible at all.
> > > > > 
> > > > > \*--  
> > > > > Regards,  
> > > > > Rafał Kuć  
> > > > > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > > > > Elasticsearch
> > > > > 
> > > > > - 
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I want, for some reason, to migrate my lucene index into an existing  
> > > > > elasticsearch cluster. Is there a way to do so?
> > > > > 
> > > > > ## Greetings and thanks for your responses, MK
> > > > 
> > > > --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [September 7, 2012, 3:05pm UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/10 "2012-09-07T15:05:51Z")

</div>

Correct, that is what I meant, of course.

## Otis

Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
Scalable Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Friday, September 7, 2012 3:57:28 AM UTC-4, David Pilato wrote:

> Agree.
> 
> I think Otis was comparing Lucene with ES on one node with 1 shard. In  
> that case, Lucene will be always faster.
> 
> ES bring so much features (horizontal scaling, replicas, sharding, ...)  
> that we could forget the overhead cost!
> 
> My 2 cents
> 
> 😉
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 7 sept. 2012 à 09:33, Lukáš Vlček \<[lukas...@gmail.com](mailto:lukas...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hi Matthias,
> 
> as Otis said, setup on the ES side can be optimized for faster indexing  
> (default settings work quite well but it can be updated for a short period  
> of time for improved indexing speed). For example, you can disable  
> replicas, disable refresh and use bulk request. After you are done with  
> indexing you can increase number of replicas and allow refresh and possibly  
> optimize index for best search performance.
> 
> For example, check "Bulk Indexing Usage" here for some tips  
> [Elastic — The Search AI Company | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html)
> 
> Just saying that indexing in ES will be always slower compared to pure  
> Lucene might be too general (up to incorrect). For example by default ES  
> divides index into 5 shards, which means 5 independent Lucene indices which  
> it indexes into in parallel. This could be faster compared to indexing into  
> single Lucene index, no?
> 
> Regards,  
> Lukas
> 
> On Fri, Sep 7, 2012 at 1:59 AM, Otis Gospodnetic \<[otis.gos...@gmail.com](mailto:otis.gos...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi Matthias,
> > 
> > ES will always be slower than Lucene because it has more stuff happening  
> > on top of Lucene. Whether it's 6x or 1.1x times depends on what exactly  
> > one is indexing/searching, how are things tuned, etc.
> > 
> > ## Otis
> > 
> > Search Analytics - [http://sematext.com/search-\*\*analytics/index.html](http://sematext.com/search-**analytics/index.html)[http://sematext.com/search-analytics/index.html](http://sematext.com/search-analytics/index.html)  
> > Scalable Performance Monitoring - [http://sematext.com/spm/index.\*\*html](http://sematext.com/spm/index.**html)[http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)
> > 
> > On Wednesday, September 5, 2012 9:45:45 AM UTC-4, Matthias Kricke wrote:
> > 
> > > I need performance. My tests show that inserting into Elasticsearch is  
> > > six times slower than inserting into lucene.  
> > > therefor I have an approach where i insert document into lucene and try  
> > > to use those indices in Elasticsearch.
> > > 
> > > next problem seems to be an blocking operation which steals the  
> > > performance of multi threaded inserting.
> > > 
> > > Would be glad to hear performance oriented answers.
> > > 
> > > Greetings,  
> > > MK
> > > 
> > > Am Mittwoch, 5. September 2012 01:46:28 UTC+2 schrieb Otis Gospodnetic:
> > > 
> > > > Hi,
> > > > 
> > > > That said, Matthias could write a simple Java app that reads documents  
> > > > from a Lucene index - assuming all fields were stored and not just indexed
> > > > 
> > > > - and index them into a newly set up ES cluster.
> > > > 
> > > > ## Otis
> > > > 
> > > > Search Analytics - [http://sematext.com/search-\*\*analytics/index.html](http://sematext.com/search-**analytics/index.html)[http://sematext.com/search-analytics/index.html](http://sematext.com/search-analytics/index.html)  
> > > > Scalable Performance Monitoring - [http://sematext.com/spm/index.\*\*html](http://sematext.com/spm/index.**html)[http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)
> > > > 
> > > > On Tuesday, September 4, 2012 9:46:57 AM UTC-4, Rafał Kuć wrote:
> > > > 
> > > > > Hello!
> > > > > 
> > > > > In addition to Lucene files there are also additional information  
> > > > > needed by Elasticsearch. So this won't be simple if possible at all.
> > > > > 
> > > > > \*--  
> > > > > Regards,  
> > > > > Rafał Kuć  
> > > > > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > > > > Elasticsearch
> > > > > 
> > > > > - 
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I want, for some reason, to migrate my lucene index into an existing  
> > > > > elasticsearch cluster. Is there a way to do so?
> > > > > 
> > > > > ## Greetings and thanks for your responses, MK
> > > > 
> > > > --
> 
> --

--

---

<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, 3:13am UTC](https://discuss.elastic.co/t/migrate-lucene-index-into-elasticsearch/8924/11 "2017-07-06T03:13:45Z")

</div>


