I agree with Chris. Alternatively, you can create two indexes: one compound index on (f1, f2) and a single index on f2. This approach will handle all your queries involving f1, f2, and f1+f2. I don’t think the attribute pattern is necessary for just two fields.
1 Like