I want to query two fields at the same time using regexp. For example- With the sample Shakespeare dataset present in Elasticsearch, I want to query fields play_name and speaker.
I want to get entries where play_name is Henry IV and speaker is KING HENRY IV. I was able to do that with query-
GET /shakespeare/line/_search?size=1000
{
"query": {
"bool": {
"must":[
{
"match_phrase": {
"play_name": "Henry IV"}
},
{ "match_phrase": {
"speaker": "KING HENRY IV"}
}
]
}
}
}
Now I want to enhance this in a way that even if I write Henry instead of Henry IV or KING HENRY IV , I get the same documents.