# Super basic indexing of all content for only fulltext search

**URL:** <https://discuss.elastic.co/t/super-basic-indexing-of-all-content-for-only-fulltext-search/158374>\
**Category:** Elasticsearch\
**Created:** [November 27, 2018, 3:51pm UTC](https://discuss.elastic.co/t/super-basic-indexing-of-all-content-for-only-fulltext-search/158374 "2018-11-27T15:51:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mriegler](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@mriegler](https://discuss.elastic.co/u/mriegler)\
**Post date:** [November 27, 2018, 3:51pm UTC](https://discuss.elastic.co/t/super-basic-indexing-of-all-content-for-only-fulltext-search/158374/1 "2018-11-27T15:51:46Z")

</div>

For a simple site search, we want to use ES. We have multiple document types in our CMS, but we only want to search everything via fulltext search. We don't care about treating any fields special.

My naive approach would be to concatenate (in our code) all fields into a single string and add that as a document to ES.

Is there a better, more "best practice" approach to this?

Thanks

---

<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:** [November 27, 2018, 4:21pm UTC](https://discuss.elastic.co/t/super-basic-indexing-of-all-content-for-only-fulltext-search/158374/2 "2018-11-27T16:21:06Z")

</div>

Yes you can do that.  
Or you can let elasticsearch with its default behavior (if the total number of fields is not that big).  
Or you can ask elasticsearch to copy at index time the content of all fields within another one using the `copy_to` feature. Look at [https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html)

---

<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:** [December 25, 2018, 4:21pm UTC](https://discuss.elastic.co/t/super-basic-indexing-of-all-content-for-only-fulltext-search/158374/3 "2018-12-25T16:21:09Z")

</div>

Closed on December 25, 2018, 4:21pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
