Here is how I use it:
FCollisionQueryParams QueryParams;
QueryParams.IgnoreMask = 1 << 3;
Now any sweep/trace that uses QueryParams will ignore any collision that has the MaskFilter = 1 << 3.
So for any primitive component subclasses that I want sweeps to ignore I set:
SetMaskFilterOnBodyInstance(1 << 3);
So If I have a Static Mesh Component, I would do:
Mesh->SetMaskFilterOnBodyInstance(1 << 3);
Now my sweeps/traces that use QueryParams will ignore Mesh.