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?
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
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.