The structure of my md file is :
---
title: Mango
subtitle: King of Fruits
tags: [fruit, sweet, tasty]
---
Mango is a very tasty fruit.
## Juice
Juice can be made from mango
When I search in the generated document, I don't get any results when I search for Mango. I do get results when I search for Juice. My understanding of search is: it searches in all H1 tags, H2 tags, and so on. I want the search to look into the meta title, subtitle, and the tags to find the result and then consider H1, H2... and other content. Is there some configuration setting in Mkdocs using which I can accomplish this? Or is there a custom solution available?
As of the writing of this answer, the option of using metadata like title and subtitle in your case in search is neither implemented in mkdocs nor in available custom themes for mkdocs.
This topic has caused a heated discussion between mkdocs maintainers and theme maintainers multiple times as both of them think it's the other's responsibility to implement this feature. More can be found here: https://github.com/mkdocs/mkdocs/issues/1828.