1

I made a simple interface to display application logs using elasticui, I'd like to highlight the results to show what was matching

I tried to add this in my controller:

$scope.$watch('ejs', function(ejs) {
    if (ejs !== undefined) {
        ejs.Highlight(['msg']);
    };
});

but it does not work (the request payload don't include the highlight part)

how should I proceed?

Mathieu
  • 5,495
  • 2
  • 31
  • 48

2 Answers2

1

Highlighting has not been added to ElasticUI yet, but it should be fairly trivial to add. If you look at IndexController you see it sets the agg, filter, query, and sort properties of ejs.Request. What you want is also add support for the highlight property in a similar way to how ElasticUI handles the other ones.

I've also opened an issue for this. It would be great if you could try and contribute it - otherwise I expect to look at it later on.

Yousef
  • 876
  • 6
  • 13
  • I can't seem to get the new directive to work. I pulled it straight from the github docs. Can you confirm this is working correctly? – psorensen Jul 24 '14 at 19:08
  • Probably better to move this discussion to Github, but yes; I've tested @Mathieu 's contributions before merging it in. Send me a fiddle and I'll try to help – Yousef Jul 25 '14 at 19:37
1

ElasticUI now supports highlighting

Mathieu
  • 5,495
  • 2
  • 31
  • 48