Anyway, I can not disable the "filename_and_content" option. I only want to search into filename, not content.
The request to search_v2:
{
"query": "screen",
"options": {
"path": "id:XXXX",
"max_results": 1000,
"file_status": "active",
"filename_only": true,
"order_by": "last_modified_time"
},
"match_field_options": {
"include_highlights": false
}
}
Response:
{
"has_more": false,
"matches": [
{
"match_type": {
".tag": "filename_and_content"
},
"metadata": {
".tag": "metadata",
"metadata": {
".tag": "file",
...
}
}
},
{
"match_type": {
".tag": "filename_and_content"
},
"metadata": {
".tag": "metadata",
"metadata": {
".tag": "file",
...
}
}
},
{
"match_type": {
".tag": "filename_and_content"
},
"metadata": {
".tag": "metadata",
"metadata": {
".tag": "file",
...
}
}
}
]
}
Only one of the tree files has the "screen" word into name.
Thanks!