Super basic indexing of all content for only fulltext search

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

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

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