Text Search query

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

  • 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 files—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.

Before you run a Text Search query, make sure the text content language is set to the language of your files. Text content language and stop words

Create a Text Search query

  1. On the Query tab, in the Create group, click Text Search.
  2. Choose where you want to search for matching text:
    • Files and Externals—search for content in all the files and externals in your project
    • Selected Items—restrict your search to selected items (for example, a set containing interview transcripts)
    • Items in Selected Folders—restrict your search to content in selected folders (for example, a folder of interview transcripts)
  3. 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 ("). Operators and special characters
  4. (Optional) Use the options on the Special popup menu to combine multiple words with special characters and operators.
  5. (Optional) Under Finding matches, select Include stemmed words if you want to include words with the same stem (e.g. look for 'talk' and also find 'talking'). 
  6. 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.

NOTES

  • To save the query, click the Save Query button and enter the name and description (optional).
  • 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.

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 Transcript field (column) are included in the query—any words in the Speaker field 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:

    • Words or phrases in annotations.
    • Stop words associated with the text content language, unless the word is between words 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 files. Text content language and stop words
    • Symbols or punctuation.
    • Parts of words—except if the text language is Chinese or Japanese.
    • 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).

    Preview the results

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

    Click the panes across the top 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.
    • 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.

    Results of a text search displayed in a word tree.

    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— Drag the Context (words) slider to increase or decrease the number of words.
    • 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.  
    • Click the Expand button (at the top right of Detail View) to make more room for working with your data. Customize the workspace

    Save the 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.

    The node will contain the content that is 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.

    1. Click the Save Results button at the top of Detail View.
    2. If you are creating a new node, enter a name and description.
    3. Click Save Results.

    NOTES

    • By default new nodes are created in the Results folder, unless you choose another location. Manage query results
    • If you save the results as a node hierarchy, relevant content from each file is coded to a separate node, under a parent node.
    • You can run the query and save the results in a single operation using the secondary click—for example, hold down the Control key and click Run Query, then click Run and Save Results....