I'm building an e-commerce search engine, and I want to do a full text search on product name, category, and a few other fields. I'm currently using copy_to to copy all the individual fields into 1 single field (called 'fullTextSearchTerms'), analyzing that field(with phonetic filter, stemmers etc), and doing a match query on it.
I'm exploring an alternative to copy_to, where during index time, I will create the 'fullTextSearchTerms' field by appending the individual fields in a space separated way, like so :
As per my understanding, the search experience should remain the same for these 2 methods of indexing, but am I missing anything? Are these two methods effectively not interchangeable in terms of search experience?
Whether the search experience is interexchangeable depends on the analyzer. In addition the result could be different for match_phrase query if the phrase hit over productName and productCategory.
If you creat fullTextSearchTerms as array, the result could be interchangeable completely.
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.