# Index Swapping and Index Configuration

**URL:** <https://discuss.elastic.co/t/index-swapping-and-index-configuration/5453>\
**Category:** Elasticsearch\
**Created:** [September 26, 2011, 3:52pm UTC](https://discuss.elastic.co/t/index-swapping-and-index-configuration/5453 "2011-09-26T15:52:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neil1](https://avatars.discourse-cdn.com/v4/letter/n/278dde/32.png) [@Neil1](https://discuss.elastic.co/u/Neil1)\
**Post date:** [September 26, 2011, 3:52pm UTC](https://discuss.elastic.co/t/index-swapping-and-index-configuration/5453/1 "2011-09-26T15:52:51Z")

</div>

Hi,

I'm using the Java API.

Is there a way to search only on one index?

Solr had a way of not replicating to the slaves unless an optimize was  
done. Is there an equivalent in elastic search?

Also, solr has the concept of the schema.xml -- how do I create  
different definitions for my fields?

Thanks,

Neil

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 26, 2011, 5:15pm UTC](https://discuss.elastic.co/t/index-swapping-and-index-configuration/5453/2 "2011-09-26T17:15:03Z")

</div>

On Mon, Sep 26, 2011 at 6:52 PM, Neil [neilmatthewlott@gmail.com](mailto:neilmatthewlott@gmail.com) wrote:

> Hi,
> 
> I'm using the Java API.
> 
> Is there a way to search only on one index?

Based on your next questions, I think you are confused a bit on the data  
schema in elasticsearch. A cluster in elasticsearch can handle many indices.  
Each index has its own distributed settings, mainly, the number of shards  
and number of replicas. You can easily search only on one index, several  
indices, or all of them using either the REST or the Java API.

> Solr had a way of not replicating to the slaves unless an optimize was  
> done. Is there an equivalent in Elasticsearch?

Thats not how elasticsearch works in terms of replication. See this  
session:

> **[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.

.

> Also, solr has the concept of the schema.xml -- how do I create  
> different definitions for my fields?

Yes, that would be called mappings in elasticsearch, and can be associated  
on a index level per type. See more here:  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/).

> Thanks,
> 
> Neil

---

<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:53am UTC](https://discuss.elastic.co/t/index-swapping-and-index-configuration/5453/3 "2017-07-06T03:53:34Z")

</div>


