Using this tag to specially focus on "highlighting" ability of ElasticSearch.
Questions tagged [elasticsearch-highlight]
12 questions
3
votes
1 answer
Elastic search: Highlight wildcrad search result
I use elastic search 7.10 and like to find documents by wildcard search on analyzed fields and highlight those in text. But this doesn't work.
The document could contain the following example: "The color of the car is black."
I expect a result in…

The Bndr
- 13,204
- 16
- 68
- 107
2
votes
0 answers
index openxml structured documents with Elasticsearch
We have a set of structured documents. The structure is extremely inspired by openxml data model. Briefly speaking, documents are made up of an ordered set of paragraphs, each paragraph itself has id and an ordered set of runs and each run has a…

vahidreza
- 843
- 1
- 8
- 19
2
votes
0 answers
Elasticsearch exclude "stop" words from highlight
I want to exclude the default stop words from being highlighted but I'm not sure why this isn't working
ES config
"settings": {
"analysis": {
"analyzer": {
"search_synonyms": {
"tokenizer": "whitespace",
…

shAkur
- 944
- 2
- 21
- 45
1
vote
1 answer
Why is elasticsearch only returning 5 highlights for a field with an array of values that have more matches based on the query?
To demonstrate the issue here is a dynamically created index with single document:
PUT /test_highlight_number/_doc/1
{
"id": 1,
"names": ["john 1","john 2", "john 3", "john 4", "john 5", "john 6", "john 7", "john 8"]
}
When I run the…

Luke Cordingley
- 665
- 4
- 11
1
vote
1 answer
Highlighting a numeric field from results fetched from custom “_all” fields
I am new to Elasticsearch. We have certain data in different data-types that we want to index and retrieve. We are using custom "_all" fields as explained in the below link
Custom "_all" fields
Following is our code
For Creating Index
PUT myindex
{
…

Chintan Shah
- 85
- 1
- 1
- 8
0
votes
0 answers
Show the position and offset of all matches in elasticsearch/lucene
I want to include start and end offset of matched term in search query using elasticsearch.
I am currently using search-highlight plugin in elasticsearch to retrieve position of matched term in result.
However, I want to include the position of…

Nguyễn Hải Hà
- 31
- 3
0
votes
0 answers
Search in html field with highlighting
I need to create a search in a HTML field using Elasticsearch. I have a react app (Next.js to be precise) to display the results. Since the highlighted results are HTML code, I want to use dangerouslySetInnerHTML but as expected it breaks the…

orlyohreally
- 410
- 6
- 19
0
votes
1 answer
Elasticsearch not returning intended results
enter image description hereWondering if anyone can help me, I'm having problems in a search performed on elastic, the search itself is very simple however for some specific words, although, they exist in the intended doc, the hit is not…

RicPeres
- 1
- 1
0
votes
1 answer
With Elasticsearch, can I highlight with different HTML tags for different matched tokens?
Learning ES at the moment, but I'm very keen to implement this.
I know you can highlight different fields with different tags, using the pre_tags and post_tags keys of highlight in a query... but is it possible to delivery a marked-up string where…

mike rodent
- 14,126
- 11
- 103
- 157
0
votes
1 answer
Elasticsearch multi-match scoring based on the number of matching highlights
I am doing a multi-match search using the following query object using script_score:
{
_source: [
'baseline',
'cpcr',
'date',
'description',
'dev_status',
'element',
'event',
'id'
…

shAkur
- 944
- 2
- 21
- 45
0
votes
0 answers
ElasticSearch highlight as anchor with parameter of the result
I want to highlight result of ElasticSearch query by html tag with parameter of result for href attribute.
Example of highlight query:
highlight" : {
"pre_tags" : [""],
"post_tags" : [""],
…

Sayed Abolfazl Fatemi
- 3,678
- 3
- 36
- 48
0
votes
1 answer
spring data elastic search highlight text
I am using Spring Data Elastic Search for querying from elastic search DB.
I need to highlight and display the searched text in the search results.
I have my setting like below
SearchQuery searchQuery = new NativeSearchQueryBuilder()
…

lives
- 1,243
- 5
- 25
- 61