# Does it make sense to index whole document

**URL:** https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191
**Category:** Elasticsearch
**Created:** [August 13, 2013, 2:57am UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191 "2013-08-13T02:57:58Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Janusz\_Dalecki](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Janusz\_Dalecki](https://discuss.elastic.co/u/Janusz_Dalecki)
#### Post date: [August 13, 2013, 2:57am UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/1 "2013-08-13T02:57:58Z")

</div>

Hi,

I have created my river for my MongoDB Asset collection that should be  
indexed by ElasticSearch.

To do that I have used the following command:

# Create river for Asset collection

[http://localhost:9200/\_river/asset\_river/\_meta](http://localhost:9200/_river/asset_river/_meta) -d '{

"type": "mongodb",

"mongodb": {

```
 "db": "my_database",

 "collection": "Asset"

```

},

"index": {

```
 "name": "asset_index",

 "type": "Asset"

```

}

}'

I think this will basically index every field in all my Asset documents –  
is that right?.

Does it make sense to do that – if I understand it I will have so many  
indexes that the searching might be as slow as just searching through the  
documents themselves? I am right?

Regards,

Janusz

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [August 13, 2013, 11:12pm UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/2 "2013-08-13T23:12:12Z")

</div>

You can supply a custom mapping for that index BEFORE the index is created,  
denoting which fields should and should not be indexed. You cannot change  
the source document, but you do have control over what fields are indexed.

--  
Ivan

On Mon, Aug 12, 2013 at 7:57 PM, JD [jdalecki@tycoint.com](mailto:jdalecki@tycoint.com) wrote:

> Hi,\*\*\*\*
> 
> I have created my river for my MongoDB Asset collection that should be  
> indexed by Elasticsearch.\*\*\*\*
> 
> To do that I have used the following command:\*\*\*\*
> 
> # Create river for Asset collection\*\*\*\*
> 
> [http://localhost:9200/\_river/asset\_river/\_meta](http://localhost:9200/_river/asset_river/_meta) -d '{\*\*\*\*
> 
> "type": "mongodb",\*\*\*\*
> 
> "mongodb": {\*\*\*\*
> 
> ```
> "db": "my_database", ****
> 
> "collection": "Asset" ****
> 
> ```
> 
> },\*\*\*\*
> 
> "index": {\*\*\*\*
> 
> ```
> "name": "asset_index", ****
> 
> "type": "Asset" ****
> 
> ```
> 
> }\*\*\*\*
> 
> }'
> 
> I think this will basically index every field in all my Asset documents –  
> is that right?.
> 
> Does it make sense to do that – if I understand it I will have so many  
> indexes that the searching might be as slow as just searching through the  
> documents themselves? I am right?\*\*\*\*
> 
> Regards,
> 
> Janusz
> 
> --  
> 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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [August 13, 2013, 11:15pm UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/3 "2013-08-13T23:15:11Z")

</div>

Slight correction in my last email. You can create the index with a custom  
mapping BEFORE the river is created. I said before the index is created,  
which is wrong.

--  
Ivan

On Tue, Aug 13, 2013 at 4:12 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> You can supply a custom mapping for that index BEFORE the index is  
> created, denoting which fields should and should not be indexed. You cannot  
> change the source document, but you do have control over what fields are  
> indexed.
> 
> --  
> Ivan
> 
> On Mon, Aug 12, 2013 at 7:57 PM, JD [jdalecki@tycoint.com](mailto:jdalecki@tycoint.com) wrote:
> 
> > Hi,\*\*\*\*
> > 
> > I have created my river for my MongoDB Asset collection that should be  
> > indexed by Elasticsearch.\*\*\*\*
> > 
> > To do that I have used the following command:\*\*\*\*
> > 
> > # Create river for Asset collection\*\*\*\*
> > 
> > [http://localhost:9200/\_river/asset\_river/\_meta](http://localhost:9200/_river/asset_river/_meta) -d '{\*\*\*\*
> > 
> > "type": "mongodb",\*\*\*\*
> > 
> > ```
> > "mongodb": { ****
> > 
> > "db": "my_database", ****
> > 
> > "collection": "Asset" ****
> > 
> > }, ****
> > 
> > "index": { ****
> > 
> > "name": "asset_index", ****
> > 
> > "type": "Asset" ****
> > 
> > } ****
> > 
> > ```
> > 
> > }'
> > 
> > I think this will basically index every field in all my Asset documents –  
> > is that right?.
> > 
> > Does it make sense to do that – if I understand it I will have so many  
> > indexes that the searching might be as slow as just searching through the  
> > documents themselves? I am right?\*\*\*\*
> > 
> > Regards,
> > 
> > Janusz
> > 
> > --  
> > 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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Janusz\_Dalecki](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Janusz\_Dalecki](https://discuss.elastic.co/u/Janusz_Dalecki)
#### Post date: [August 14, 2013, 12:38am UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/4 "2013-08-14T00:38:45Z")

</div>

Hi Ivan,

1. 

```
    So would you agree with me that indexing all fields (columns) 

```

in all documents is an overkill?  
2. Is there a comprehensive document how to set what field is to  
be analysed – do I have to do it for every field? Is there a global flag I  
can set to not analyse field and then set individual fields to be analysed?

Regards,

Janusz

On Wednesday, August 14, 2013 9:12:12 AM UTC+10, Ivan Brusic wrote:

> You can supply a custom mapping for that index BEFORE the index is  
> created, denoting which fields should and should not be indexed. You cannot  
> change the source document, but you do have control over what fields are  
> indexed.
> 
> --  
> Ivan
> 
> On Mon, Aug 12, 2013 at 7:57 PM, JD \<[jdal...@tycoint.com](mailto:jdal...@tycoint.com) \<javascript:\>\>wrote:
> 
> > Hi,\*\*\*\*
> > 
> > I have created my river for my MongoDB Asset collection that should be  
> > indexed by Elasticsearch.\*\*\*\*
> > 
> > To do that I have used the following command:\*\*\*\*
> > 
> > # Create river for Asset collection\*\*\*\*
> > 
> > [http://localhost:9200/\_river/asset\_river/\_meta](http://localhost:9200/_river/asset_river/_meta) -d '{\*\*\*\*
> > 
> > "type": "mongodb",\*\*\*\*
> > 
> > ```
> > "mongodb": { ****
> > 
> > "db": "my_database", ****
> > 
> > "collection": "Asset" ****
> > 
> > }, ****
> > 
> > "index": { ****
> > 
> > "name": "asset_index", ****
> > 
> > "type": "Asset" ****
> > 
> > } ****
> > 
> > ```
> > 
> > }'
> > 
> > I think this will basically index every field in all my Asset documents –  
> > is that right?.
> > 
> > Does it make sense to do that – if I understand it I will have so many  
> > indexes that the searching might be as slow as just searching through the  
> > documents themselves? I am right?\*\*\*\*
> > 
> > Regards,
> > 
> > Janusz
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [August 14, 2013, 1:41am UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/5 "2013-08-14T01:41:34Z")

</div>

Hi Janusz,

Answers inline.

On Tue, Aug 13, 2013 at 5:38 PM, JD [jdalecki@tycoint.com](mailto:jdalecki@tycoint.com) wrote:

> Hi Ivan,\*\*\*\*
> 
> 1. 
> 
> ```
> So would you agree with me that indexing all fields
> 
> ```
> 
> (columns) in all documents is an overkill?

The biggest downside is that your overall index size will be bigger. If  
your Lucene index does not fit into memory, elasticsearch could swap to  
disk more frequently. Field/filter caches will not be bigger if the fields  
are not queried (ignoring the \_all field for now).

> 1. 
> 2. 
> 
> ```
> Is there a comprehensive document how to set what field is
> 
> ```
> 
> to be analysed – do I have to do it for every field?
> 
> It is up to your application about which fields should be indexed or not.  
> Not analyzed and not indexed are two different things. Not analyzed means a  
> field is indexed, but does not go through the tokenization/filtering  
> process. Providing your custom mapping will not only mark which fields  
> should be indexed, but also how they should be analyzed. By default,  
> indexed fields uses the Standard analyzer, but you will soon discover that  
> certain fields require a different analyzer or not be analyzed at all  
> (while still being indexed).

> 1. Is the a global flag I can set to not analyse field and then set  
> individual fields to be analysed?
> 
> Look into dynamic templates:

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

Cheers,

Ivan

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Janusz\_Dalecki](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Janusz\_Dalecki](https://discuss.elastic.co/u/Janusz_Dalecki)
#### Post date: [August 14, 2013, 3:02am UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/6 "2013-08-14T03:02:31Z")

</div>

Hi,  
So in this simple mapping example below:  
{  
"Asset" : {  
"\_all":{  
"analyzer":"english"  
},  
"assetCategoryId" : {  
"type" : "long", indexed : false  
},  
"className" : {  
"type" : "string"  
}  
}  
}

I have added 'indexed' property set to false for the filed '  
assetCategoryId'.  
Is this correct what I have done. From now on 'assetCategoryId' the should  
not be indexed - as I never search on that field.  
Regards,  
Janusz

On Wednesday, August 14, 2013 9:12:12 AM UTC+10, Ivan Brusic wrote:

> You can supply a custom mapping for that index BEFORE the index is  
> created, denoting which fields should and should not be indexed. You cannot  
> change the source document, but you do have control over what fields are  
> indexed.
> 
> --  
> Ivan
> 
> On Mon, Aug 12, 2013 at 7:57 PM, JD \<[jdal...@tycoint.com](mailto:jdal...@tycoint.com) \<javascript:\>\>wrote:
> 
> > Hi,\*\*\*\*
> > 
> > I have created my river for my MongoDB Asset collection that should be  
> > indexed by Elasticsearch.\*\*\*\*
> > 
> > To do that I have used the following command:\*\*\*\*
> > 
> > # Create river for Asset collection\*\*\*\*
> > 
> > [http://localhost:9200/\_river/asset\_river/\_meta](http://localhost:9200/_river/asset_river/_meta) -d '{\*\*\*\*
> > 
> > "type": "mongodb",\*\*\*\*
> > 
> > ```
> > "mongodb": { ****
> > 
> > "db": "my_database", ****
> > 
> > "collection": "Asset" ****
> > 
> > }, ****
> > 
> > "index": { ****
> > 
> > "name": "asset_index", ****
> > 
> > "type": "Asset" ****
> > 
> > } ****
> > 
> > ```
> > 
> > }'
> > 
> > I think this will basically index every field in all my Asset documents –  
> > is that right?.
> > 
> > Does it make sense to do that – if I understand it I will have so many  
> > indexes that the searching might be as slow as just searching through the  
> > documents themselves? I am right?\*\*\*\*
> > 
> > Regards,
> > 
> > Janusz
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [August 14, 2013, 5:13pm UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/7 "2013-08-14T17:13:44Z")

</div>

The setting to have a field not indexed is "index": "no".

"assetCategoryId" : { "type" : "long", "index": "no" }

The className attribute is using the default settings, so you can even  
exclude it if you want. Depends if you like explicit or concise mappings (I  
prefer the former, just like you have it now).

Cheers,

Ivan

On Tue, Aug 13, 2013 at 8:02 PM, JD [jdalecki@tycoint.com](mailto:jdalecki@tycoint.com) wrote:

> Hi,  
> So in this simple mapping example below:  
> {  
> "Asset" : {  
> "\_all":{  
> "analyzer":"english"  
> },  
> "assetCategoryId" : {  
> "type" : "long", indexed : false  
> },  
> "className" : {  
> "type" : "string"  
> }  
> }  
> }
> 
> I have added 'indexed' property set to false for the filed '  
> assetCategoryId'.  
> Is this correct what I have done. From now on 'assetCategoryId' the  
> should not be indexed - as I never search on that field.  
> Regards,  
> Janusz
> 
> On Wednesday, August 14, 2013 9:12:12 AM UTC+10, Ivan Brusic wrote:
> 
> > You can supply a custom mapping for that index BEFORE the index is  
> > created, denoting which fields should and should not be indexed. You cannot  
> > change the source document, but you do have control over what fields are  
> > indexed.
> > 
> > --  
> > Ivan
> > 
> > On Mon, Aug 12, 2013 at 7:57 PM, JD [jdal...@tycoint.com](mailto:jdal...@tycoint.com) wrote:
> > 
> > > Hi,\*\*\*\*
> > > 
> > > I have created my river for my MongoDB Asset collection that should be  
> > > indexed by Elasticsearch.\*\*\*\*
> > > 
> > > To do that I have used the following command:\*\*\*\*
> > > 
> > > # Create river for Asset collection\*\*\*\*
> > > 
> > > [http://localhost:9200/\_river/\*\*asset\_river/\_meta](http://localhost:9200/_river/**asset_river/_meta) -d '{\*\*\*\*
> > > 
> > > "type": "mongodb",\*\*\*\*
> > > 
> > > ```
> > > "mongodb": { ****
> > > 
> > > "db": "my_database", ****
> > > 
> > > "collection": "Asset" ****
> > > 
> > > }, ****
> > > 
> > > "index": { ****
> > > 
> > > "name": "asset_index", ****
> > > 
> > > "type": "Asset" ****
> > > 
> > > } ****
> > > 
> > > ```
> > > 
> > > }'
> > > 
> > > I think this will basically index every field in all my Asset documents  
> > > – is that right?.
> > > 
> > > Does it make sense to do that – if I understand it I will have so many  
> > > indexes that the searching might be as slow as just searching through the  
> > > documents themselves? I am right?\*\*\*\*
> > > 
> > > Regards,
> > > 
> > > Janusz
> > > 
> > > --  
> > > 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 elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > .
> > 
> > --  
> > 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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Janusz\_Dalecki](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Janusz\_Dalecki](https://discuss.elastic.co/u/Janusz_Dalecki)
#### Post date: [August 14, 2013, 11:45pm UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/8 "2013-08-14T23:45:40Z")

</div>

Hi,

Thank you Ivan very much for all the info you have provided in this thread.

Just one more thing - is there a documentation on this syntax - I have  
tried to find out what type of fields I can put in mapping file and what  
are the valid values, but I couldn't.

Regards,

Janusz

On Wednesday, August 14, 2013 9:12:12 AM UTC+10, Ivan Brusic wrote:

> You can supply a custom mapping for that index BEFORE the index is  
> created, denoting which fields should and should not be indexed. You cannot  
> change the source document, but you do have control over what fields are  
> indexed.
> 
> --  
> Ivan
> 
> On Mon, Aug 12, 2013 at 7:57 PM, JD \<[jdal...@tycoint.com](mailto:jdal...@tycoint.com) \<javascript:\>\>wrote:
> 
> > Hi,\*\*\*\*
> > 
> > I have created my river for my MongoDB Asset collection that should be  
> > indexed by Elasticsearch.\*\*\*\*
> > 
> > To do that I have used the following command:\*\*\*\*
> > 
> > # Create river for Asset collection\*\*\*\*
> > 
> > [http://localhost:9200/\_river/asset\_river/\_meta](http://localhost:9200/_river/asset_river/_meta) -d '{\*\*\*\*
> > 
> > "type": "mongodb",\*\*\*\*
> > 
> > ```
> > "mongodb": { ****
> > 
> > "db": "my_database", ****
> > 
> > "collection": "Asset" ****
> > 
> > }, ****
> > 
> > "index": { ****
> > 
> > "name": "asset_index", ****
> > 
> > "type": "Asset" ****
> > 
> > } ****
> > 
> > ```
> > 
> > }'
> > 
> > I think this will basically index every field in all my Asset documents –  
> > is that right?.
> > 
> > Does it make sense to do that – if I understand it I will have so many  
> > indexes that the searching might be as slow as just searching through the  
> > documents themselves? I am right?\*\*\*\*
> > 
> > Regards,
> > 
> > Janusz
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [August 15, 2013, 4:28am UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/9 "2013-08-15T04:28:45Z")

</div>

I meant to include some links, but I forgot.

The core type documentation information on the settings:

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

Overall analysis:

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

Elasticsearch is built on top of Lucene, so all of the analysis concepts  
such as analyzers, tokenizers and filters are also explained in Lucene  
documentation. That said, Lucene's documentation is not very good. Solr is  
also built on top of Lucene, and has decent docs:

> **[Home](https://doc.lucidworks.com/)**
>
> A documentation site for Lucidworks products

Cheers,

Ivan

On Wed, Aug 14, 2013 at 4:45 PM, JD [jdalecki@tycoint.com](mailto:jdalecki@tycoint.com) wrote:

> Hi,\*\*\*\*
> 
> Thank you Ivan very much for all the info you have provided in this thread.
> 
> * * *
> 
> Just one more thing - is there a documentation on this syntax - I have  
> tried to find out what type of fields I can put in mapping file and what  
> are the valid values, but I couldn't.\*\*\*\*
> 
> Regards,\*\*\*\*
> 
> Janusz\*\*\*\*
> 
> On Wednesday, August 14, 2013 9:12:12 AM UTC+10, Ivan Brusic wrote:
> 
> > You can supply a custom mapping for that index BEFORE the index is  
> > created, denoting which fields should and should not be indexed. You cannot  
> > change the source document, but you do have control over what fields are  
> > indexed.
> > 
> > --  
> > Ivan
> > 
> > On Mon, Aug 12, 2013 at 7:57 PM, JD [jdal...@tycoint.com](mailto:jdal...@tycoint.com) wrote:
> > 
> > > Hi,\*\*\*\*
> > > 
> > > I have created my river for my MongoDB Asset collection that should be  
> > > indexed by Elasticsearch.\*\*\*\*
> > > 
> > > To do that I have used the following command:\*\*\*\*
> > > 
> > > # Create river for Asset collection\*\*\*\*
> > > 
> > > [http://localhost:9200/\_river/\*\*asset\_river/\_meta](http://localhost:9200/_river/**asset_river/_meta) -d '{\*\*\*\*
> > > 
> > > "type": "mongodb",\*\*\*\*
> > > 
> > > ```
> > > "mongodb": { ****
> > > 
> > > "db": "my_database", ****
> > > 
> > > "collection": "Asset" ****
> > > 
> > > }, ****
> > > 
> > > "index": { ****
> > > 
> > > "name": "asset_index", ****
> > > 
> > > "type": "Asset" ****
> > > 
> > > } ****
> > > 
> > > ```
> > > 
> > > }'
> > > 
> > > I think this will basically index every field in all my Asset documents  
> > > – is that right?.
> > > 
> > > Does it make sense to do that – if I understand it I will have so many  
> > > indexes that the searching might be as slow as just searching through the  
> > > documents themselves? I am right?\*\*\*\*
> > > 
> > > Regards,
> > > 
> > > Janusz
> > > 
> > > --  
> > > 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 elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > .
> > 
> > --  
> > 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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:21am UTC](https://discuss.elastic.co/t/does-it-make-sense-to-index-whole-document/13191/10 "2017-07-06T02:21:03Z")

</div>


