I guess the word was scavenging. Lexico has
scavenge
VERB
Search for and collect (anything usable) from discarded waste.
They would have to consider non-cashews to be waste!
The word is used in various news stories in connection with mining. BBC News has
‘I feel guilty for surviving’: The deadly hunt for jade in Myanmar
Si Thu Phyo was scavenging for leftover gemstones when he felt the earth shake loose around him.
And in The Independent
South Africa's illegal gold miners forced to scavenge in abandoned shafts in a perilous attempt to survive
The term has a formal usage in connection with mineral extraction as given by the Hudson Institute of Mineralogy in their definition of
scavenger
i. Any chemical that is added to a system or a mixture to consume, or to convert to an inactive form, small quantities of impurities or undesired materials.
ii. In flotation, a rougher cell in which the tailings, before being rejected as waste, are subjected to a scavenging flotation treatment. Concentrating tables are also used as scavenger machines.
iii. In metallurgical operations, an active metal added to combine with oxygen and/or nitrogen in the molten metal and so cause removal of impurities into slag.
The pejorative sense is shown here by Lexico
scavenger
NOUN
An animal that feeds on carrion, dead plant material, or refuse.