Problem:
Qualtrics TextIQ allows you to search for terms within a specific word distance using the ~# operator, where # is the maximum number of words apart (e.g., ~4 for within 4 words). However, your original attempt—((doctor | dr | provider) AND (nice | tone | explain))~4—is invalid because the proximity operator must be applied to phrases, not directly to sets of alternatives.
Solve:
To find responses where any word from the first set (e.g., doctor, dr, provider) is within 4 words of any word from the second set (e.g., nice, tone, explain), you can construct a query by combining all possible pairs with the ~4 operator and joining them with OR. For example:
- The query would look like:
("doctor nice"~4 OR "doctor tone"~4 OR "doctor explain"~4 OR
"dr nice"~4 OR "dr tone"~4 OR "dr explain"~4 OR
"provider nice"~4 OR "provider tone"~4 OR "provider explain"~4)
Recommendation :
While this approach works, it can become unwieldy for larger keyword sets. For instance, if the first set has 5 keywords and the second set has 5, you’d need 25 combinations, making the query lengthy and potentially harder to manage. TextIQ’s documentation does not specify a limit on query complexity, but for practical purposes, it’s advisable to test the query in small increments to ensure it processes correctly.
If the query becomes too complex, another approach is to:
- Create separate topics for each keyword set using the search functionality.
- Filter responses that contain both topics, but note that this won’t enforce proximity directly.
- Manually review the results to identify responses where the terms are close, though this is less efficient and defeats the purpose of automation.
you can read more here Topics in Text iQ