I want to add elements to an array, or remove some keys from my map in my custom searcher results in Vespa.
For ex: I have the following fields in my hit of the searcher:
fields:
n: 0,
myArray: [0, 1, 2]
myMap: {"key1":"value1", "key2":"value2"}
I want to append values (3, 4) to my array and remove a key (key2) from my map, in the result hits, to return:
fields:
n: 0,
myArray: [0, 1, 2, 3, 4]
myMap: {"key1":"value1"}
I have followed the reference link Inspecting Structured Data but I am unable to add or remove entries from the Inspector Object that I have created. I don't want to create a new SlimeAdapter Object for my array/struct. As this will need to traverse the array completely and add individual entries to my new object, which I want to avoid.
Please, suggest an approach for the same.