Search Techniques Help

Most searches can produce good results by using a few Basic Search Techniques.
For more complex situations see the section below on Advanced Search Techniques.

A note on variable-level and study-level searching: within a single study, only variable-level searching is available. In cross-study searching, variable-level search is the default but study-level searching may also be available -- depending on how the SDA archive is configured. Most search techniques discussed below apply to either variable-level or study-level searching.

Basic Search Techniques

Finding Variables (or Studies) with ANY versus ALL of the Search Terms

Selecting Text Fields to search

Advanced Search Techniques

Field Syntax

By default, all fields in a variable (or a study) are searched. However, you can limit your search to specific fields -- variable name, variable label, question text, or category labels. If you want to search only one field, you can specify that field on the drop-down list of fields, as described above.

However, the special field syntax allows you to search for specific terms in specific fields by typing (in the search box) the field name followed by a colon (":") and then the term you are looking for in that field. (Note that you cannot put any spaces before or after the colon.) The short names of the fields for variables are:

The short names of the fields for study descriptions are:

(The names of the fields are also shown in square brackets in the drop-down list for default fields to search.)

For example, if you want to find a variable with 'health' in the variable label and with 'insurance' in the question text, you could use the query:

label:health text:insurance

If you want to find variables with 'health' both in the label and in the question text you could use:

label:health text:health

Boolean Operators -- AND, OR, and NOT

The default operator is AND, which means that a variable must contain ALL of the search terms. The default can be changed to OR, which means that a variable only has to contain ANY of the search terms, by clicking the appropriate radio button under the search box, as described above.

If you want to specify combinations of operators, you must use explicit Boolean operators. The supported Boolean operators are: 'AND', 'OR', and 'NOT'. (Note that Boolean operators must be written in ALL CAPS, in order to distinguish them from the search terms.)

Those accustomed to Boolean searches can use the symbolic abbreviations for the operators. They are && (for AND), || (for OR), and ! (for NOT).

Using Parentheses with Complex Queries

If you form a query that contains complex Boolean logic, you should use parentheses to make your query unambiguous. For example, instead of using:

health OR insurance AND doctor

you should make your intention clear by supplying parentheses.

If a match must contain either 'health' OR 'insurance', but must also contain 'doctor', then you would use:

(health OR insurance) AND doctor

If a match must contain either 'health' OR both 'insurance' and 'doctor', then you would use:

health OR (insurance AND doctor)

If you do not use parentheses, you will still get a result, but the rules for operator precedence are complicated and hard to remember. So it is better just to use parentheses.