Using elasticsearch as my primary database

Hi,
I'm considering using elasticsearch as my primary db, the alternative being
a couchbase-elasticsearch combo.
Group discussionshttps://groups.google.com/forum/?fromgroups=#!searchin/elasticsearch/primary$20database/elasticsearch/qAnXu5w3pn4/Te1vli7dfccJappear positive, but I have an issue that I have not seen discussed. If I
want to change an index mapping, I need to flush the index. This deletes
everything I have stored on Elasticsearch.
Is there an alternative?

--

Hello Amy,

If you add new fields to your mapping, it should work just fine
(they're added to your current mapping). If you try to change the type
of a certain field in your mapping, you will get an error, but
flushing[0] the index doesn't delete your data.

If you need to change the type of a field (let's say from long to
float), you have to reindex your data. You can do that on the live
cluster by scrolling[1] through your data and indexing it in a
different type where you have the new mapping.

Of course if your indices become corrupt for any reason (eg: file
system failure), there's no getting away from backups. But that should
be the same for any database.

Best regards,
Radu

http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

[0] Elasticsearch Platform — Find real-time answers at scale | Elastic
[1] Elasticsearch Platform — Find real-time answers at scale | Elastic

On Wed, Oct 17, 2012 at 6:19 PM, Amy amyblarney@gmail.com wrote:

Hi,
I'm considering using elasticsearch as my primary db, the alternative being
a couchbase-elasticsearch combo.
Group discussions appear positive, but I have an issue that I have not seen
discussed. If I want to change an index mapping, I need to flush the index.
This deletes everything I have stored on Elasticsearch.
Is there an alternative?

--

--

Thank you Radu, that helped. I also found this example of how to reindex in
Perl: ElasticSearch.pm v0.36, now with extra sugar | Clinton Gormley [blogs.perl.org]

On Wednesday, October 17, 2012 5:06:54 PM UTC+1, Radu Gheorghe wrote:

Hello Amy,

If you add new fields to your mapping, it should work just fine
(they're added to your current mapping). If you try to change the type
of a certain field in your mapping, you will get an error, but
flushing[0] the index doesn't delete your data.

If you need to change the type of a field (let's say from long to
float), you have to reindex your data. You can do that on the live
cluster by scrolling[1] through your data and indexing it in a
different type where you have the new mapping.

Of course if your indices become corrupt for any reason (eg: file
system failure), there's no getting away from backups. But that should
be the same for any database.

Best regards,
Radu

http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

[0]
Elasticsearch Platform — Find real-time answers at scale | Elastic
[1] Elasticsearch Platform — Find real-time answers at scale | Elastic

On Wed, Oct 17, 2012 at 6:19 PM, Amy <amybl...@gmail.com <javascript:>>
wrote:

Hi,
I'm considering using elasticsearch as my primary db, the alternative
being
a couchbase-elasticsearch combo.
Group discussions appear positive, but I have an issue that I have not
seen
discussed. If I want to change an index mapping, I need to flush the
index.
This deletes everything I have stored on Elasticsearch.
Is there an alternative?

--

--