Dear all

Happy new year!

I have a problem when I use the highlight, I want to highlight a field
'abs' while it contains html, like:

the content of field 'abs':
... The molecule:(L<sup>2</sup>L<sup>3</sup>M)<sub>n</sub> ...

I want to escape the html when highlight and found that the "encoder" option.

I use this option:

    "highlight": {
        "escape_html": "html",
        "pre_tags": ["<strong><span class=\"text-danger\">"],
        "post_tags": ["</span></strong>"],
        "fields": {
            "abs": {
                "fragment_size": 150,
                "number_of_fragments": 1,
                "no_match_size": 150
            }
        }
    },

but nothing changed, the html tags like '<sup>' still returned untouched.

Any hints of what could be wrong?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CANnJ_2ObfTrUa9fvb2hkB0wNhSaPw5u9fSc_h_RM%2B56irmCMzg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to