Skip to content

Commit

Permalink
Update _search query match field in Documentation (#9075)
Browse files Browse the repository at this point in the history
* Update _search query match field

Fields was `text` but the field where the match should occur is `dob` which returns the actual match.

Signed-off-by: Alberto Saavedra <[email protected]>
Signed-off-by: Alberto <[email protected]>

* update highlight

Signed-off-by: Alberto <[email protected]>

---------

Signed-off-by: Alberto Saavedra <[email protected]>
Signed-off-by: Alberto <[email protected]>
  • Loading branch information
albertsaave authored Jan 17, 2025
1 parent a4ae08c commit 222e8be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _field-types/supported-field-types/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ GET testindex/_search
{
"query": {
"match": {
"text": "date of birth"
"dob": "date of birth"
}
},
"highlight": {
"fields": {
"text": {}
"dob": {}
}
}
}
Expand Down Expand Up @@ -170,4 +170,4 @@ The words "date of birth" are highlighted in the response:
]
}
}
```
```

0 comments on commit 222e8be

Please sign in to comment.