Use existing idx field over indexOf.
Switch to using a match count as a much faster check for query token usage against set results.