Run a Text Search query

 


Text Search queries allow you to find all occurrences of a word, phrase, or concept in your project. This topic explains how you can create Text Search queries and what you can do with the results of the query.

What do you want to do?


 


Understand Text Search queries

Text search queries let you search for words or phrases in your sources.

You can use a Text Search query to:

  • Explore the use, context and meaning of words—are some expressions used more widely in a specific demographic?

  • See if an idea or topic is prevalent in your sources—particularly in the early stages of your project.

  • Automatically code words or phrases. For example, find each occurrence of solar or wind power and code them (and the selected context around them) at the node renewable energy. Refer to Broad brush coding using queries for more information.

If you are using NVivo Pro or NVivo Plus, you can also use a Text Search query to:

  • Search for concepts that include similar words. For example, if you search for sport, NVivo can find words with similar meanings: recreation, play, and fun.

Before you run a Text Search query, make sure the text content language is set to the language of your source materials—refer to Set the text content language and stop words for more information.

If you a run a Text Search query created in a different edition of NVivo, it may search sources that aren't supported in your edition. You will see accurate results but you won't be able to open or view some references. Refer to About queries (Working with queries across editions) for more information.

Top of Page

Create a Text Search query using the Wizard

This video describes how to create and run a Text Search Query within the Wizard.

 

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

The Query Wizard opens. Follow the steps on the Wizard.

 

Wizard step Description

Choose the query you want to run.

Click See where particular terms occur in content.

Specify the terms you want to search for.

In the Search for box, type a word or phrase. If you want to search for an exact phrase, enclose it in double quotation marks (").

Click Special if you want to combine multiple words with special characters and operators.

Select a Finding matches option. Choose to find exact matches or include words with the same stem—for example, you can search for sport and find sporting.
If you have NVivo Pro or NVivo Plus you can adjust the slider to broaden your search to find similar concepts. For example, find sport, play and recreation. Refer to Understand text match settings for more information.

Choose where you want to search.

Choose whether you want to search text in all your sources, or restrict the search to selected items or folders.

Choose whether to add the query to your project.

You can run the query once or choose to add it to your project (and run it).

If you choose to add it to your project, you must enter a name. You can optionally enter a description.

  1. Click Run.

The query is executed and the results are displayed in Detail View.

Create a Text Search query outside the Wizard

If you are not familiar with NVivo queries, you may want to create your Text Search query using the Wizard—the Wizard guides you through the process of setting your query criteria. However, not all query features are available in the Wizard, so you may sometimes want to create your Text Search queries outside the Wizard.

  1. On the Query tab, in the Create group, click Text Search.

  1. Choose where you want to search for matching text:

  • All sources—search for content in all the sources in your project, including externals and memos
  • Selected Items—restrict your search to selected items (for example, a set containing interview transcripts)
  • Selected Folders—restrict your search to content in selected folders (for example, a folder of interview transcripts)
  1. In the Search for box, enter the word or phrase that you want to search for. If you want an exact phrase enclose it in double quotation marks (").

  2. (Optional) Click Special to combine multiple words with special characters and operators.

  3. Select a Find option. Choose to find exact matches or include words with the same stem—for example, you can search for sport and find sporting. If you have NVivo Pro or NVivo Plus you can adjust the slider to broaden your search to find similar concepts. For example, find sport, play and recreation. Refer to Understand text match settings for more information.

  4. Click the Run Query button at the top of Detail View.

When the query has finished running, the results are displayed as a temporary preview in Detail View.

NOTE

  • To save the Text Search query, click the Add to Project button and enter the name and description (optional).

  • To make references more meaningful, you may want to increase the spread (amount of coding spread around the search word). Select an option in the Spread to list. Refer to Spread coding for more information. If you choose to spread coding, you cannot view the results as a word tree.

  • Use the Save Results button 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

What text is included in a Text Search query?

When running a Text Search query, NVivo applies the following rules:

  • In audio and video transcripts, only words in the Content field (column) are included in the query—any words in custom transcript fields are ignored.

  • In datasets, only words in codable fields (columns) are included in the query—any words in classifying fields are ignored.

A Text Search query does not find:

  • Stop words associated with the text content language, unless the word is within a search phrase or the text content language is Chinese or Japanese. Stop words are less significant words, such as conjunctions and prepositions. You can edit the list of stop words to suit the content of your sources—refer to Set the text content language and stop words for more information.

  • Symbols or punctuation.

  • Parts of words—except if the text language is Chinese or Japanese.

  • Words or phrases in framework matrix summaries.

  • Words within images. PDFs created by scanning paper documents may contain only images—each page is a single image. If you want to use Text Search queries to explore the text in these PDFs, then you should consider using optical character recognition (OCR) to convert the scanned images to text (before you import the PDF files into NVivo).

Top of Page

Tips for text search queries

In all editions:

  • You can choose to look for exact matches or words with the same stem—for example, you can search for talk and find talk, talking and talked.

  • If you search for a phrase, the results will not include words with the same stem. For example, if you search for "alternative energy", you will not be able find "alternative energies".

  • If you include the special search operator 'tilde' (~) to specify proximity in your Text Search Criteria, the results will not include words with the same stem.

  • If you include the special search operators 'wildcard' (*) and 'fuzzy' (~) in your Text Search Criteria, you will be limited to 'Exact match only'.

If you are using NVivo Pro or NVivo Plus:

  • you can adjust the Finding matches slider to find words with similar meaning. For example, you can search for sport and find sport, sporting, play and basketball. Refer to Understand text match settings for more information.

  • If you search for individual words, you will find only individual words—not phrases. For example, if you search for unemployed and adjust the slider to find similar words, you will find unemployment and jobless, but not out of work.

  • You may be able to find similar words if you search for a phrase—depending on the phrase. For example, if you search for words similar to "out of work", you will find any instances of unemployed and jobless.

  • If you search for a combination of a single word and a phrase (for example, "out of work" OR unemployed), you will not be able to find similar words.

  • If a word has multiple meanings, you may get unexpected results—refer to When I look for similar words, I get words I did not expect for more information.

Top of Page

Preview the results

When you run a Text Search query, by default, the Summary tab is in focus showing a list of all sources that contain the word or phrase.

Click the other tabs on the right to see:

  • Reference  The results are opened as a node preview and the word or phrase is shown with a narrow context. You can also expand the context around a reference.

  • Text, Picture, Audio, Video, or Dataset  Displays the results found in each type of source—only relevant tabs are available.

  • Word Tree  Displays the results as a tree with branches representing the various contexts in which the word or phrase occurs. You may be able to find recurring themes or phrases that surround the word. The size of the font indicates the number of times the word or phrase was found. The Word Tree tab is not available when you select to spread coding.

When you view the results as a Word Tree, you can:

  • Click a branch to highlight all of the other related branches to see the wider context.

  • Change the number of words that are displayed in the branches— in the Context (Words) box, in the Options group on the Word Tree tab, select the number of words you want to show.

  • Change the order of the branches in the word tree. In the Branch Order box, in the Options group, on the Word Tree tab, select Alphabetical (to order branches alphabetically), or Number of matches (to order branches by the frequency in which the branch occurs).

  • Display a different word as the root. For example, if you search for contaminate including stemmed words and synonyms, you may find that pollution is at the root of the branches because it occurs more frequently. To select a different root word, in the  Root Term box, in the Options group, on the Word Tree tab, select the root term you want to show.

  • Find the project item where a particular occurrence of the word is used—right-click on a branch to see the short-cut menu, then click Run Text Search Query.  

Top of Page

Save the preview results as a node

If your query has returned interesting content, you may want to save it as a node, so that you can explore it further. Saving the results of Text Search queries as nodes can be a quick way of organizing your material into broad themes—refer to About coding (Broadbrush Coding using queries) for more information.

The node will contain the content that is displayed on the Reference tab in the query results in Detail View. The Word Tree tab does not display when you save the results of a query as a node. 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 the Save Results button at the top of Detail View.

  2. 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)

  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 run the query and save the results in a single operation—click the arrow on the Run Query button and select Run and Save Results.

Top of Page

Use a Compound query to refine your text search

This feature is available in NVivo Pro and NVivo Plus.

You can use a Compound Query to further refine a text search, for example you could

  • Combine two Text Search queries to find where one term precedes another
  • Combine a Text Search query with a Coding query to find text in relation to coding—where young women talk about climate change, do they use the word pessimistic?

Top of Page