ElasticSearch highlight as anchor with parameter of the result

139 Views Asked by At

I want to highlight result of ElasticSearch query by html <a> tag with parameter of result for href attribute.

Example of highlight query:

highlight" : {
    "pre_tags" : ["<a href='xyz.php?no=typeA.Number'>"],
    "post_tags" : ["</a>"],
    "fields" : {
        "*" : {}
    }
}

in this example I want to use field Number as value for query string no inside href attribute of tag <a>.

How it's possible?

0

There are 0 best solutions below