Public search snippet function

Not that sure whether this is the correct way to do this but it seems
to work perfectly. Will do for now, will research some more.