elasticsearch-gui icon indicating copy to clipboard operation
elasticsearch-gui copied to clipboard

Highlight simple search results

Open kalwar opened this issue 8 years ago • 3 comments

How do you highlight simple search results? It would be great if simple search strings are also highlighted in the results page.

I tried something like this but failed miserably. :( [query_parsing_exception] [simple_query_string] query does not support [pre_tags]

executedQuery = { "simple_query_string": { "query": vm.search.simple, "highlight" : { "pre_tags" : ["<tag1>", "<tag2>"], "post_tags" : ["</tag1>", "</tag2>"], "fields" : { "_all" : {} } },

kalwar avatar Apr 15 '16 18:04 kalwar

Do you mean in the app or in general? If in the app which screen? if you have generic elastic question I prefer if you use the discus.elastic.co

jettro avatar Apr 30 '16 07:04 jettro

Thanks for your kind response.

I was wondering in the simple search. If it would be possible to highlight the search result, for example when user enters search query in the simple search, would it be possible to also highlight the search query in the results field.

If you want me to post question on discus.elastic.co, I'll post is there too.

kalwar avatar Apr 30 '16 08:04 kalwar

I wasn't sure if you meant in the tool or in elasticsearch in general. If it is a question for the tool there is no need to post it in discuss. But now I understand you, I'll make it an enhancement. Planning some time the coming weeks to do some updates to the tool.

jettro avatar May 01 '16 06:05 jettro