In order to perform highlighting, the actual content of the field is required. If the field in question is stored (has store set to true in the mapping) it will be used, otherwise, the actual _source will be loaded and the relevant field will be extracted from it.
The _all field cannot be extracted from _source, so it can only be used for highlighting if it mapped to have store set to true.
Is field 'name' stored or no? Need I add 'store' attribute for it? Btw, I tried use 'name' instead of '_all', but result was the same. So, can you show me what I need to fix in my example to see highlighting?
No, it's not stored by default separately, but content can be extracted from _source. So, it is not the issue.
Unless you also specified name in the query, your search was executed against the field _all. By default, highlighting only works with the fields you are searching against. So, you can do something like
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.