Text search

Text searches 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—useful 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) to the code renewable energy.
  • Search for concepts that include similar words. For example, if you search for fish, NVivo can find words with similar meanings: scallops, crabs, and fishing.

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

Run a text search

You can run text searches from the Query Wizard or using the dedicated text search function—both offer the same options, but presented in slightly different format.

  1. On the Explore tab click Text Search or Query Wizard.
    If using the wizard, click See where particular terms occur in content on the first page.
  2. In the Search for box, enter the word or phrase that you want to search for.
    To search for an exact phrase enclose it in double quotation marks (") or click Special to combine multiple words with special characters and operators (see Operators & special characters).
  3. Select a Find option:
    1. exact matches only
    2. exact matches plus words with the same stem—e.g. find farming and farmed when you search for farm
    3. all the above, plus synonyms (words with the same meaning)
    4. all the above, plus specializations—i.e. words for examples of the search term, e.g for farm, land and produce are specializations
    5. all the above, plus generalizations—i.e. categories that the search term belongs to, e.g agriculture is a generalization of farming.
  4. Select to search text in all your files, or restrict it to selected items or folders.
    • 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)
    • Selected Folders—restrict your search to content in selected folders (for example, a folder of interview transcripts)
  5. Run the query:
    • Save query criteria—you can save query criteria (i.e. your configuration settings) so you can run an identical query at a later time. In the wizard, set this up before you run the query, or after in the text search function. The settings are saved under Queries / Query Criteria in the Navigation View.

    • Save query results—in both the wizard and text search function you can save the results of the query.

When the query has finished running, the results are displayed in the Detail View.

NOTES

  • 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. If you choose to spread coding, you cannot view the results as a word tree.
  • Use Save Results to set your preferences for storing the results—for example, you might want to store the results as a code.

What text is included in a text search?

When running a text search, NVivo applies the following rules:

  • In audio and video transcripts, only the Content field (column) is searched—custom transcript fields are ignored. In datasets, only codable fields (columns) are included—classifying fields are ignored.
  • Text searches do not find:

    • 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 & stop words
    • 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).

    Tips for text search queries

    • 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 "renewable energy", you will not be able to find "renewable 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. Operators & special characters
    • If you include the special search operators 'wildcard' (*) and 'fuzzy' (~) in your Text Search Criteria, you will be limited to 'Exact match only'.
    • Avoid combining 'wildcard' (*) with phrases in your Text Search Criteria—for example, water* OR "Great blue"— because this can produce unexpected results.
    • You can adjust the Find slider to find words with similar meaning. For example, you can search for fish and find fish, fishing, scallops and crabs.
    • 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.

    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 other tabs on the right to see:

    • Reference The results are opened as a code 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.

    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— on the Word Tree tab select the number of words you want to show in the Context (Words) field.
    • Change the order of the branches in the word tree. On the Word Tree tab, Branch Order field, 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, on the Word Tree tab, in the  Root Term box, 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.  

    Save the results as a code

    If your query has returned interesting content, you may want to save it as a code, so that you can explore it further. Saving the results of Text Search queries as codes can be a quick way of organizing your material into broad themes.

    The code 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 code. If you repeatedly run the same query, you may want to merge the references into an existing code, rather than create them as a new code.

    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.
      • Create the results as a new code or case
      • Merge the results into an existing code or case
    3. If you are creating a new code, enter a name and description.
    4. Click OK.

    NOTES

    • By default new codes are created in the Results folder, unless you choose another location. Manage query results
    • If you save the results as a code hierarchy, relevant content from each file is coded to a separate code, under a parent code.
    • 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.

    Use a compound query to refine your text search

    You can use a compound query to further refine a text search Compound query, for example you could:

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