Sign in or register
for additional privileges

Using NVivo: An Unofficial and Unauthorized Primer

Shalin Hai-Jew, Author

You appear to be using an older verion of Internet Explorer. For the best experience please upgrade your IE version or switch to a another web browser.

Data Query: Text Search Query

Text contains complex meanings for humanity, from the past through the present.

Text Search Query 


Ever wonder how an individual is mentioned in a text set?  An event?  Other named entities?  Ever wonder about the contextual uses of phrases?  Formulas?  #hashtags?  Keywords?  There is a commonly used feature in NVivo that enables finding every instance of particular alphanumeric text strings in an NVivo project (or in particular subsets of textual data within the project). 






A basic text query enables researchers to find all instances of a particular word, phrase, concept, equation, or other data “string” anywhere in the project or in a particular part of the project (such as the sources, the nodes, single files, data sets, or other subsets of the data).   A text query is used to track the occurrences of a particular concept (represented symbolically using symbolic language) and the contexts of those occurrences, through the research project or parts of the project.  The resulting concordance may be represented in word trees with the lead-up text to the target word as well as the lead-away text.  

This tool is helpful for a quick machine skim of massive amounts of secondary research to identify particular works which address concepts that the researcher may want to explore in more depth.  It is helpful to understand the “gist” and “word sense” of a particular term and how it is used in the various contexts of a project.  It is helpful to draw out meanings from Tweetstream datasets.  These provide fast-identification of potentially relevant information.  

All queries may be saved to a file (in the Queries space of the Navigation View).  These may be re-run based on the same parameters especially after new information has been included.  

Note that there is a Special button to the right of the text field in which the search may be define.  A right click on that button results in a drop-down menu.






“Special” Text Searches


To summarize the Special button briefly, each of the above features will be briefly addressed.  

Wildcard searches


In a search, a “wildcard” is a character that stands in for a number of variations for any other characters that could appear in that spot or that sequence. 

Here, a “wildcard” feature enables the swapping out of any one character in a search, so that multiple versions of a word or word variations (with the “?” swapped out for a vowel, for example) may be searched for and identified with one search.  A wildcard search indicated by an asterisk (*) may stand in for zero or more characters in that location.  (Think of the “wildcard” as a stand-in placeholder.) 


b?t:  bit, bat, bot, bet, but 
b*t:  bit, bat, bot, bet, but, beat, Brit, boot, beaut, braut, beret, BLT, etc. 


Wildcard characters can be used in combination, with both the * and the ? used simultaneously and even multiply in a text search query.  An example may be s*.p?? for a file with a range of possible names and with multiple formats.  

In NVivo, wildcard characters cannot be used as the first character of a string; further, they can only be used in single terms (words or equations), not phrases.  (Remember that wildcard searches enable some fuzziness in searching by the uses of characters to stand in for indefinition.  The character * (asterisk) enables any number of characters, and the character ? (question mark) enables any one character of any type in one location.)  


Boolean operators


There are also Boolean operators that may be applied to a text query search.  The use of AND means that any source in the text search.  The use of AND means that any source in the text search should have both or all of the search terms linked by the AND.  The “AND” requires the two features in any of the sources found and delivered to the researcher.  

In a search using the OR operator, any source identified has to have one or the other of the terms on either side of the OR.  Of multiple words or phrases are listed without any operator indicated, the “OR” is assumed by NVivo.  So any one occurrence of any of the words or phrases will be sufficient to call up a source in that text search query.  

The NOT is used to add specificity and disambiguation.  The way this is used is to have a first desirable search term with the NOT following and then a term that follows the NOT to indicate what is not desired.  The idea is that the first and latter term may be somewhat close in meaning but that only the first term (and its meaning) is desirable to eliminate extraneous sources in the text search.  The NOT serves to prohibit a particular string of data in the text search. 


Proximity / collocation search


A “proximity” (collocation) search enables the searching of sources in which two words are in spatial closeness relationship (or "proximity") to each other.  This is set up with two terms followed by a tilde and a number (“focus now”~10). The number indicates the largest proximity of words between the two selected terms.  So if a researcher remembered the gist of a sentence and wanted to recover the source which contained that concept but couldn’t remember exact contiguous words, then this type of proximity search would be helpful.  A two-word proximity search follows below. 





Computational "fuzzy" searching


A “fuzzy” search is one in which NVivo conducts approximate string matching to search for both exact text searches but also similar ones based on known synonyms for the selected terms (and possibly other factors).  A "fuzzy" search indicates that it is somewhat "imprecise" and not honed in on a particular term alone.  NVivo will search for the desired term *and* related ones (in an additive search).  In this case, the sources pulled up (with select terms highlighted) will be for the specific terms and for synonymous or similar-meaninged ones, semantically.  Also, there can be a kind of “pattern matching” for other searches possibly based on phrase structures and meanings.  

Those who would prefer to use special characters in the text search criteria window may refer to the Other special characters table.  Those who want direct information about special characters and operators may go to the direct link

These queries may be saved and run again later with the same settings later. (Find saved queries in the Queries folder of the Navigation View.)



Visualizing Results in a Word Tree



One of the options in a text search is to visualize results in a word tree.  In a word tree, the lead-up words to a target term (or its stemmed forms or its synonyms) and the lead-away words are shown.  The word tree is interactive in NVivo.  Here, if a phrase is clicked, its corresponding lead-up or lead-away words are also highlighted.  Also, double-clicking on a phrase will lead to the original source where that phrase was found.  


An Example of a Wildcard Search


Seeding text and phrases for a text query may be placed directly into the text search window. An example of seeding text may be the following:  "rand*"~7.  This sequence means that the target term being searched for in the corpus is RAND with any words or stand-alone characters next to it 7-characters deep to either side.  





The resulting word tree follows.  




As another example, the proper noun "Horn" (a name of a cited author) was used with a similar approach in order to capture co-authors in the proximity of the word occurrence in the text corpus.

Said another way, the wildcard characters can be used as a "proximity search" of sorts. (There is an actual proximity search in the advanced search area.) 
 





A Walk-through with the "Query Wizard" Feature


The Query Wizard (in the Query Tab in the Create area) may be used for a Text Search query.  "Wizards" are helpful for initial setups of queries because they offer a explanatory and granular step-by-step walk-through of the decisions required for a successful query. 



Saving a Word Tree as a Coded Node


The results of a word tree may be saved as a node for further exploration by clicking on the button at the top right of the Word Tree "Save Results..." 

The results may then be included in future queries. 



The saved file looks like a text file.  




This tool feature benefits from initial broad and wide searches to capture all likely examples. 

Human sense-making is important in all computational analysis. The machine does not dominate the interpretation per se.  Computers are here to enable human work. 


Comment on this page
 

Discussion of "Data Query: Text Search Query"

Add your voice to this discussion.

Checking your signed in status ...


Related:  Chart View by Weekly TweetstreamTeam or Group Coding in NVivoDownloading, Installing, and Registering the SoftwareSome Types of Data Visualizations in NVivoGeolocation of Microblogging Messages (Tweets)NCapture and the Web, Twitter/X, YouTube, and Other Social MediaData Query: Compound Query (Advanced)A Research Workflow with NVivo IntegrationsData Query: Coding Query"Using NVivo" CoverConducting Data Queries in NVivo (Part 1 of 2)Autocoding a Tweetstream Dataset2D Cluster View of Tweetstream DataGeographical NodesData Query: Matrix Coding QueryFuture Look: Data Repositories for NVivo-based Data Sets?Ingesting "Internal" Source ContentsConducting Data Queries... (Part 2 of 2)What is NVivo?Copy Project Window in NVivo 10 (Windows)Data Query: Coding Comparison (Advanced) and Cohen's Kappa CoefficientCiting Published and Unpublished Sources in NVivoManual Coding in NVivoStructured and "Unstructured" (Multi-Structured) Data in a Tweetstream Dataset"Autocoding" through Machine Learning from Existing (Human) Coding PatternsTweetstream Table ViewTweetstream dataAnalyzing Social Media Data in NVivoCluster Map View of TweetstreamTo Go with NVivo or Not? (and Partial Checklist for Stopping Usage of NVivo)The NVivo User Interface"Autocoding" through Styled or Sequentially-Structured Textual DataDisambiguating Data VisualizationsData Query: Group Query (Advanced)CNN Tweetstream Geographical MapIntroResearch Journaling in NVivoIngesting "External" Source Contents (Think "Proxy")Creating Relationships between Project Items (Nodes, Sources, and Other Entities)Creating Codebooks in NVivo (through Reports...through Share)Starting a New NVivo ProjectData Query: Word Frequency Count QueryNCapture Capture of a Twitter TweetStream