They were all filtering the river looking for gold. 'Looking for gold' is a non-finite clause acting as an adverb sentence modifier. 'Filter the river' is a little strange; I think they re filtering the sand: Looking for gold, they were all filtering the river sand.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.