Elasticsearch exact highlighting -


i want recieve highlighted text list of highlighted words, not whole text or fragments.

my query percolator query:

{'doc': {'field_name': text}, "highlight": {         "fields": {             "field_name": {}         }     }, 'size': 100} 

for example, default receive

field_name: ['some text ...<em>word1</em> ... text ...<em>word2</em> text...'] 

i want receive:

field_name: ['word1', 'word2'] 

how can it?

i wandering how , haven't implemented yet found question on stackoverflow think help.

you should able find match on "highlight" key of elasticsearch response


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -