I don't think it quite works that way. Yes, you can boost a field but you cannot boost a term dependent on it's location in some markup because you don't know that at the time of the search.
I think what you could do is create an Umbraco event handler that fires when a page is published. This event could:
- Utilise the
GatheringNodeData
event of an Index Take the contents of the rich text editor-based field and using regex or something like HtmlUtility extract specific text based upon it's markup location, e.g. H1, H2 and H3 text.
For each piece of text in a heading found, add it into a string variable
- Add the whole string into the Lucene index as a new field, e.g. "Headings"
- You can now boost on the "Headings" field separately to the field containing the field containing the HTML.