Run a Compound query

 


You can use a Compound query to combine a Text Search and Coding query—this can be useful when you want to search for a term within (or near) coded content. A Compound query can also combine two Text Search queries or two Coding queries.

What do you want to do?


 


Understand Compound queries

Compound queries can help you to find content in your sources that is close to other content. For example, you can:

  • Combine a Text Search and Coding query to search for text in or near coded content

  • Combine two Text Search queries to search for content where one term precedes another

  • Combine two Coding queries to search for content coded at one node, near content coded at another

Top of Page

Create a compound query

You cannot use the Query Wizard to run a Compound query—these queries must be created outside the Wizard, as described below:

  1. On the Query tab, in the Create group, click Compound.

The Compound Query dialog box opens.

  1. Under Search for content matching select options from the lists:

  1. Subquery 1 select the first query type and then click Criteria—refer to Run a Text Search query or Run a Coding query for more information on building the criteria.

  2. NEAR Content select a coding search operator such as AND. If you chose the NEAR or PRECEDING Content, you can specify the options for proximity and retrieval. Refer to Combine criteria in queries for more information.

  3. Subquery 2 select the second query type and then click Criteria—refer to Run a Text Search query or Run a Coding query for more information on building the criteria.

  1. (Optional) Set the scope of your query:

  2. From the In list, select the items you want to include in the query—click the Select button to select the project items.

  3. From the Where list, you can specify to search project items created and/or modified by any or selected users—click the Select button to select the project items.

  1. Click Run.

NOTE

  • To save the Compound query, select the Add to Project check box and enter the name and description (optional) in the General tab.

  • Click the Query Options tab to define the spread coding options (amount of coding spread around the search word.  Refer to Spread coding for more information.  

  • The Query Options tab also allows you to set your preferences for storing the results—for example, you might want to store the results as a node when you run the query. Refer to Query options for detailed information.

Top of Page

By default, the results of a Compound query are displayed as a preview node in Detail View—the Reference tab is in focus:

Click the tabs on the right to see the matching content that has been coded in text (documents, memos and externals), audio, video, picture or dataset sources.

By default the results are displayed in a preview node—you can choose save this node in the Results folder or in another node folder, refer to Save the preview results as a node for more information.

If you prefer nodes to open with the Summary tab in focus, you can change the setting in Application Options.

If you include an 'aggregate' node in the scope of a query, content coded at the node and all its direct children will be included in the query results—refer to Aggregate nodes for more information.

Top of Page

If your query has returned interesting content, you may want to save it as a node, so that you can explore it further. For example, you might find all the content coded at the node water quality, which contain the term agriculture. You can save it to a node and review it later.

The node will contain the content displayed on the Reference tab in the query results in Detail View. If you repeatedly run the same query, you may want to merge the references into an existing node, rather than create them as a new node.

To save the references as a node:

  1. Click on the query results in Detail View.

  2. On the Query tab, in the Actions group, click Store Query Results.

The Store Query Results dialog box opens.

  1. From the Option list, choose what you want to do with the results. You can:

  • Create the results as a new node

  • Merge the results into an existing node (you must select the node to merge into)

  • Create a node hierarchy where the references from each source are in a separate child node

  1. If you are creating a new node, enter a name and description.

  1. Click OK.

NOTE  

  • By default new nodes are created in the Results folder, unless you choose another location. Refer to Manage query results (Understand the Results Folder) for more information.

  • If you save the results as a node hierarchy, relevant content from each source is coded to a separate node, under a parent node.

  • You can choose how you want to store the results before you run the query—by setting your preferences on the Query Options tab in the Compound Query dialog box.

Top of Page

Make a set of the sources in your results

You can create a set from the results of a Compound query—the set members are the sources displayed on the Summary tab in the query results in Detail View.

For example, you might want a list of all the interview documents where people mentioned policy in the context of health care. You can save these interviews to a set for further analysis.

To save the results to set:

  1. Click in the query result in Detail View.

  2. On the Query tab, in the Actions group, click Store Query Results.

The Store Query Results dialog box opens.

  1. From the Option list, choose whether you want to create a new set or add the sources to an existing set.

  1. If you are creating a new set, enter a name and description.

  2. Click OK.

Top of Page