I use ES7 to search PDF files.
When I search something with match_phrase
, I get 2 word occurrences, even though the document has 59 occurrences.
What can be the reason for this? How can I optimize the query?
{
"from": 0,
"size": 2500,
"_source": [
"filename",
"folder"
],
"highlight": {
"fields": {
"attachment.content": {
"number_of_fragments": 1000,
"force_source": true,
"type": "fvh"
}
}
},
"query": {
"bool": {
"must": [
{ "match_phrase": { "attachment.content": "lorem ipsum dolor" } }
]
}
}
}