When using the React SearchUI how is the config setup to search a nested field created by using the attachment processor? Searching for "attachment.title" works in the console. In the SearchUI config I've tried title and "attachment.title" as shown in the example below but the result displayed is the attachment object as: attachment[object Object] .
const config = {
searchQuery: {
search_fields: {
"attachment.title": {
weight: 3
},
"language": {},
},
result_fields: {
"attachment.title": {
snippet: {}
},
"language": {}
},
Query at console for a nested feild that works:
GET slr-test/_search
{
"_source": ["attachment.title"],
"query": {
"match_all": {}
}
}
It returns:
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 2,
"relation": "eq"
},
"max_score": 1,
"hits": [
{
"_index": "slr-test",
"_id": "CAO6_JIBjabE2jgYaldN",
"_score": 1,
"_ignored": [
"attachment.content.keyword"
],
"_source": {
"attachment": {
"title": "JDR_4126995 1..10"
}
}
},
{
"_index": "slr-test",
"_id": "CQPy_JIBjabE2jgYDVe-",
"_score": 1,
"_ignored": [
"attachment.content.keyword"
],
"_source": {
"attachment": {
"title": "JDR_4126995 1..10"
}
}
}
]
}
}