Text and node searches in NVivo v.2
Authors of this page: Graham R. Gibbs and Celia Taylor
Affiliation: University of Huddersfield
Date written: 30th June 2005
Text and node searches
Searching is an important analytic technique and that computers excel at. Two kinds of searching are supported by NVivo: lexical searching and node searching. The former involves searching for text; the latter enables you to make analytic comparisons.
Searching is one of the most powerful tools available in NVivo. It can be used for both an exploratory approach to the data, just to see what is there and for checking hunches. Text search, as I have described above is very good for exploration, but you can use node searching in this way too. For example it can be used to elaborate the dimensions of responses and you might use it as a way of developing a taxonomy and improving the content and structure of your node hierarchy. For example, in the Unemployed in Yorkshire project imagine you have done a node search to bring together all the text about the evaluation of various work finding services (e.g. an 'or' search). Reading through this text you might note that there are several different kinds of response to the services. Some respondents found them helpful, others found them inaccessible, others found them irrelevant to their needs. You can create new nodes for these ideas (code to them from the text you have found) as a dimension of the concept of evaluation.
Simple lexical search
A simple lexical search of documents
To search all documents
- In the project pad click the search button (). The Search Tool dialog opens. See Figure 1.
- This dialog has three sections. At the top you define what kind of search and what to look for. In the middle, you say where the program should search (which documents) and at the bottom you specify the spread.
- By default an NVivo search creates a new node that codes the words found and here you specify how much of the text surrounding them you want to code as well. (You can always change this coding later). click Text to open the Text Search dialog. See Figure 2.
- Type in the word you want to find. In the Advanced Options, click Regular Search from the pop down menu. click OK.
- In the Scope section of the Search dialog ensure that Document Set is All Documents.
- At the bottom of the dialog specify how you want to spread the finds.
- click In a scope Document to: pull-down menu. click either Enclosing paragraphs or Characters either side and if you select the latter, specify a sensible number of character like 50. click Run Search.
- In the Search Completed dialog click OK. A node browser opens showing the text you have found. The word you have searched for will be somewhere in each passage displayed.
- To see the text found in its context in the original document, right click the text and click Browse/Edit/Code Document.
Figure 1. NVivo Search Tool
Figure 2. NVivo Text Search dialog
You can search for more than one word at a time and for variations of the words by using wildcards and special characters.
|Search string||Will find|
|[talk|talking|talks]||'talk' and/or 'talking' and/or 'talks' etc.|
|talk[a-z]*||any of 'talk', 'talking', 'talks', 'talked' etc.|
Search for nodes, attributes and text
NVivo contains functions for searching and retrieving text that has already been coded searching for nodes and/or attributes. This allows a very rich set of comparisons to be made.
When doing text search it is clear that what is being searched for is text and what is being searched in is text. This is less obvious when searching nodes and/or attributes, but it is important to recognize that the same is true. In these cases what is compared in the search is the actual text coded at or linked to the node or variable. Thus in the simplest case, if you search for one node OR another, what is compared is the text coded with these nodes. The search will find all the text coded at either node, if any (including that coded at both nodes, if any).
NVivo allows two or more nodes (and sometimes attributes too) to be searched for in combination. Such combination is divided into two kinds, Boolean and proximity.
Boolean searches combine codes using the logical terms like 'and', 'or' and 'not'. This type of search is named after the mathematician, Boole, who first formalised them. Common Boolean searches are 'or' (also referred to as 'combination' or 'union') and 'and' (also called 'intersection').
Proximity searches rely on the coded text being near, after or perhaps overlapping some other coded text. Commonly used proximity searches are 'followed by' (also referred to as 'sequence' or 'preceding') and 'near' (also referred to as 'co-occurrence').
Table 1 explains how they work and gives some examples. Although both Boolean and proximity searches are useful for investigating the data and checking hunches, the Boolean searches are most useful in examining hypotheses or ideas about the data and rely on consistent and accurate coding, whereas proximity searches can be more used speculatively and to explore the data, often at an early stage of coding.
Table 1 Common Boolean and proximity searches using code A and code B
A and B
only the text that is coded with both A and B and not any text that is codFriday, November 18, 2005 10:55" valign="top">
If A is 'gives account' and B is 'plays truant' then A and B will find all the places the respondent explains why they stay away from school.
A or B
any text that is coded with A or B or both. N.B. it is often useful to do an 'or' search on three or more nodes at once. This will find text coded with any of the nodes.
In a project on people who have separated from their partners, if A is 'abandoned', B is 'drifted apart', C is 'mutual agreement' then A or B or C will find and bring together all the ways the people describe their reasons for splitting up.
A followed by B
the text that is coded with node A where it is followed by some text coded with node B. You may have to specify how closely it is followed.
In the same experience of separation project, if A is 'turning point' and B is 'training' then A followed by B (retrieving B) will show where people talk about training they have had after their turning point.
A near B
only the text that is coded with one node that appears near text coded with the other (before or after or even overlapping). You will need to define what near means, for example 'within 2 paragraphs'.
In the homelessness project, if A is 'becoming homeless' and B is 'anger' then A near B (retrieving A) will show where people talk about becoming homeless that is associated with their expressing anger.
For example, imagine in a study of people looking for work, you have coded all talk about looking for work to the nodes 'Routine', 'Haphazard' and 'Entrepreneurial'. If you wanted to compare how men talked in these ways with how women talked about the same then you could either do a search for text with the variable value 'male' and coded with the node 'Routine', and then text with value 'female' and coded with the node 'Routine'. Then repeat this for 'Haphazard' and 'Entrepreneurial'.
Too search and compare nodes
To search all documents
- In the project Pad click Search button. The Search Tool opens. See Figure 1. above.
- click Boolean button. The Boolean Search dialog opens. See Figure 3.
- click the Operator: pull down menu
- click Intersection (And), if it is not already showing.
- click Choose Nodes... button to open the Choose Node dialog.
- Find the node 'Routine' in the listing on the left, click it and click Add:Node button.
- click OK. click Choose Attribute Values... button to open the Choose Attributes Values dialog.
- double click Document Attributes and find the attribute 'Gender'.
- click the plus sign by it to show its values.
- click Male, click = button, then click OK.
- The node 'Routine' and the attribute value 'Male' should now be showing in the item list. See Figure 3.
- click OK. In the Search Tool dialog determine the scope you want e.g. All Non Memo Documents. click Run Search.
- In the Search Completed dialog click OK.
- A node browser opens showing the text that is coded with 'routine' in the male documents.
- Rename this node in the Node Browser (and move it) if you wish to keep it.
- Repeat the search but with attribute Gender value = female. (In the Choose Attribute Values dialog click Gender=Male item and click Remove button. click Female, click = button, then click OK.)
Figure 3. NVivo Boolean Search dialog.