Below is a critical tip that is gone, I believe, unnoticed for Sharepoint Search 2013.
Let’s say you want to show a list of countries by using an accordion control. The control is shown collapsed when it is first downloaded from the server.
Collapsed state (default)
Expanded ( after explicit user interaction)
The text in the accordion items are not included in the search results by no means.
I found no information about the solution of this problem by any resource on the web. So, I had to discover it by intuitive experimental diagnosis and thought it will be useful to share it on the web for those who have the same problem.
You should set display:none property by css file reference instead of inline css style setting.
The critical information is that Sharepoint 2013 Search crawler doesn’t process texts under tags where inline “display:none” styling is set. The effect is recursive to inner tags as well. But the crawler processes the content as expected if display:none property is set by external css file reference. You should consider using setting display:none from an external css file if you want to load the content invisible by default.
You may want to exclude the content from search results. In this case, setting display:none property inline may be your friend. However, if you want to show the content yet exclude it from search result you should use noindex class.
Note: noindex class will only effect the text of the node it was assigned to. It is not effective recursively, so, it won’t effect the inner nodes of noindex tag.