# Have a couple of questions on ES

**URL:** https://discuss.elastic.co/t/have-a-couple-of-questions-on-es/9401
**Category:** Elasticsearch
**Created:** [October 18, 2012, 5:14am UTC](https://discuss.elastic.co/t/have-a-couple-of-questions-on-es/9401 "2012-10-18T05:14:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Subramanian\_Narayana](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@Subramanian\_Narayana](https://discuss.elastic.co/u/Subramanian_Narayana)
#### Post date: [October 18, 2012, 5:14am UTC](https://discuss.elastic.co/t/have-a-couple-of-questions-on-es/9401/1 "2012-10-18T05:14:13Z")

</div>

Hi,

I am new to ES. I am using ES via logstash "embedded" setting for  
standalone logstash setup.

However i am planning to use ES in a centralized logstash setup. Hence I  
need to install ES in a seperate cluster.

On these lines,I have the following couple of questions.

1. Can i install ES in a hadoop cluster havind HDFS. Can ES use HDFS as the  
file system instead of plain disk. What are the pros n cons of using HDFS  
as the filesystem for ES. If its a performance issue, what is the impact.  
Is it 3x or 10x etc.

2. I saw from an older thread, by selecing HDFS gateway, we can replicate  
and store the ES index in HDFS. Does index mean all "data" or its a index  
like a mysql index.

3. How do we delete data from ES. Can you give pointer to doc/tutorial on  
how to delete data indexed from ES.

Thanks in advance.

Subbu

--

---

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [October 18, 2012, 9:16am UTC](https://discuss.elastic.co/t/have-a-couple-of-questions-on-es/9401/2 "2012-10-18T09:16:04Z")

</div>

Hello Subramanian,

On Thu, Oct 18, 2012 at 8:14 AM, Subramanian Narayanan  
[ping2sriram@gmail.com](mailto:ping2sriram@gmail.com) wrote:

> Hi,
> 
> I am new to ES. I am using ES via logstash "embedded" setting for standalone  
> logstash setup.
> 
> However i am planning to use ES in a centralized logstash setup. Hence I  
> need to install ES in a seperate cluster.
> 
> On these lines,I have the following couple of questions.
> 
> 1. Can i install ES in a hadoop cluster havind HDFS. Can ES use HDFS as the  
> file system instead of plain disk. What are the pros n cons of using HDFS as  
> the filesystem for ES. If its a performance issue, what is the impact. Is it  
> 3x or 10x etc.

I haven't done any benchmarks, but I would use local gateway if this  
would be an option. It's the more recommended and more tested option.

> 1. I saw from an older thread, by selecing HDFS gateway, we can replicate  
> and store the ES index in HDFS. Does index mean all "data" or its a index  
> like a mysql index.

"Index" in the context of Elasticsearch usually refers to something  
like "database" in mysql. It might contain the source - which is  
default and basically means all data - or not - in which case you only  
have the inverted index, like in mysql index terminology. More  
information on "source" here:

> **[Elastic — The Search AI Company](https://www.elastic.co)**
>
> Power insights and outcomes with The Elastic Search AI Platform. See into your data and find answers that matter with enterprise solutions designed to help you accelerate time to insight. Try Elastic ...

> 1. How do we delete data from ES. Can you give pointer to doc/tutorial on  
> how to delete data indexed from ES.

If it applies to your usecase, the recommended option is to have  
rolling indices (eg: one index per day, or per week, month, etc) and  
remove old data by simply deleting old indices. Like:

curl -XDELETE localhost:9200/old\_index

This is very fast, basically like removing the corresponding files from disk.

If you don't have that option, you can use TTL:

> **[Elastic — The Search AI Company](https://www.elastic.co)**
>
> Power insights and outcomes with The Elastic Search AI Platform. See into your data and find answers that matter with enterprise solutions designed to help you accelerate time to insight. Try Elastic ...

and old data will automatically deleted after the specified time.

Or, you can manually delete all documents that match a certain query:

> **[Elastic — The Search AI Company](https://www.elastic.co)**
>
> Power insights and outcomes with The Elastic Search AI Platform. See into your data and find answers that matter with enterprise solutions designed to help you accelerate time to insight. Try Elastic ...

Please note that when documents are deleted from an index (as opposed  
to when you delete a whole index), they're only marked for deletion,  
and will be physically removed when segments are merged. The way it  
actually happens depends on the merge policy:

> **[Elastic — The Search AI Company](https://www.elastic.co)**
>
> Power insights and outcomes with The Elastic Search AI Platform. See into your data and find answers that matter with enterprise solutions designed to help you accelerate time to insight. Try Elastic ...

Either way, merging implies quite a heavy I/O activity, which is why  
it's better for performance to have rolling indices.

> Thanks in advance.
> 
> Subbu
> 
> --

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--

---

<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:08am UTC](https://discuss.elastic.co/t/have-a-couple-of-questions-on-es/9401/3 "2017-07-06T03:08:09Z")

</div>


