(Maybe there are other ways to do the same thing, but finding complete documentation rather than different handfuls of examples on Windows Search seems to be impossible.)
To generate that query from a single dlgstring prompt, you'll probably need either a script (to take an input like "Family,Friends" or "Family and Friends" and turn it into the right query) or to make the dlgstring take the whole query string (so you'd have to type "tags:Family AND tags:Friends" into the prompt; but then you might as well use the normal search field).