How I can use the highlighter in react app

Hi, I want to ask how to apply the highlighter in my react app because when I tried it says its not parameter, I try it on my get req



          `http://localhost:9200/ncar_index/ncar/_search?q=${} AND ${this.state.search_query_drop}&size=100&sort=date:desc&default_operator=AND`


Instead of using request parameters, you should switch to using the Query DSL, so that you can specify your request including highlighting in JSON - this also means you do not need to worry about HTTP encoding and escaping in your queries.

1 Like

Hi again Mr. Alexander Reelsen,

I had no idea about the Query DSL, can it be written in React.js directly?

Hi, Saud AlBallaa!
Did you succeed highlighting in react? I am trying to do the same thing... :upside_down_face:

Hi Diana,

I didn't try yet to be honest, but I'm willing to do so if I succeed I will send you a message or reply to this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.