I have been trying to create a custom highlighter by creating a plugin that implements SearchPlugin, getHighlighter() method and create my own CustomHighlighter class that implements the Highlighter interface and its highlight() method.
My logic needs to check the user query to determine what should be highlighted.
Question: How can I get the user query from within SearchPlugin.getHighlighter() method and/or the CustomHighlighter?
(the whole REST request body is preferred).