Search: Types of Searches

There are four types of searches: Term Search, by Example, Time Search, and Notes. For a description of these searches and some guidelines for when you might want to use each of them, see Search: Basics.

Searching from Other IN-SPIRE Locations

You can search from other IN-SPIRE locations, including the Document Viewer and the Summary panel in the left sidebar. In all cases:

  1. Highlight the term or phrase to search for.
  2. Right-click on it. A right-click menu appears.
  3. From the right-click menu, choose the type of search to run.
  4. The search will run, and documents found will be selected.
  5. If your search was By Example, use the Search Tool to select documents by similarity. See By Example below.

Term Search

To run a Term Search using a Quick Search:

  1. Type the search term in the Quick Search box located on the IN-SPIRE Toolbar, and press Enter.
  2. The search will execute, and the documents will be selected.

To run a Term Search using the Search Tool:

  1. Click on the Advanced Advanced search buttonsearch button to open the Search Tool.
  2. If necessary, click on the Term Search tab to bring it to the top.
  3. Type a word or words in the Search Text box. See the Search Text Syntax below.
  4. Select the Fields you want to search. You can either search All Fields (the default) or select one or more fields to search by clicking on the items in the Fields list using ALT-CTRL-click. The terms are combined with ANDs and all selected fields are searched.
  5. Select which documents to search: All, or only those that are selected. If no documents are selected, the "selected documents" choice will not be available.
  6. Click Search. The search will run. All documents it finds will be selected.
  7. To create a group from the results, click Group Results.

Cutting, Copying, and Pasting a Search Term

Search terms can be cut and copied from a Word or text document and pasted into the Quick Search box or search text field in the Search Tool.

Term Search Syntax (IN-SPIRE 5.0+)

Datasets created in IN-SPIRE 5.0 and beyond will use the following search syntax:

Single Words. Match the specified word and may include the wildcard characters ? and *.

Phrases. Match a specified sequence of one or more elements defined within double quotes ("…").

Ordered Phrases. Match an ordered sequence of elements defined within brackets and optionally a leading asterisk (*) followed by a number indicating the potential distance between elements in the phrase.

Unordered Phrases. Match an unordered sequence of elements defined within brackets which has a leading tilde (~) and optionally followed by a number indicating the potential distance between elements in the phrase.

Choices. Match one or more of the elements defined within parentheses ((…)).

AND, OR, NOT. Each Boolean operator is applied to the two elements that surround it in the search.

For more details on term search syntax, see Search: New Term Search Capabilities.

Search Text Syntax (Pre IN-SPIRE 5.0)

Datasets created before IN-SPIRE 5.0 will use the following search syntax:

Phrases. Enclose a search phrase in quotes. For example, "islamic". Within the phrase you may use an asterisk (*) as a wildcard.

Multiple Words. Connect words in the Search Text box with AND, OR, or AND NOT, to construct a Boolean search (! is ignored, as are XOR, and |).

Wildcards. You can use an asterisk in a term search as a "wildcard" representing characters or words.

Since IN-SPIRE substitutes a space for any punctuation, contractions such as "don't" become two words, "don" and "t". Use wildcards such as *2 to find contractions that were split during processing.

Wildcards. Use an asterisk at the end of a word for word stemming. For example, "defen*" will return documents containing any words beginning with "defen", including "defense", "defend", "defensive", etc.

Choice Lists. See Choice Lists.

Fields

The default is to search All Fields, but it is sometimes helpful to search only one or two fields, for example, if searching All Fields returns many analytically-unhelpful documents, or if the dataset has a field which you can use to restrict the search in a useful way.

If you choose to search more than one field, it is important to note that the entire search is run against each of the specified fields separately. Such a search returns documents for which one or more of the selected fields satisfies the search criteria. The search is not applied across the specified fields. For example, suppose you selected the TITLE and AUTHOR fields, and then entered the following search text:

Abbott and Costello

This would return documents with both words, Abbott and Costello, in the title, or both words in the author field, or both words in both fields. Note that this search would not return a document with the following field content:

TITLE: The Life and Times of Bud Abbott

AUTHOR: I. B. Costello

This is because neither the content of neither field taken by itself satisfies the search criteria.

One effect of this rule is that selecting all of the individual fields in the Fields list is not equivalent to selecting All Fields.

Relevance

The Document Viewer displays the relevance of documents retrieved by a term search, analogous to the quality of the match shown for Search by Example results. Relevance is computed from:

Customizing Punctuation Rules

Punctuation rules, which are created when a dataset is created, apply not only to the search expression but to the content of any document to be searched.

For example, suppose you want to "de-hyphenate" all hyphenated words, such that "hold-up" maps to "holdup." To do this:

  1. From the main menubar, choose File > Datasets. The Dataset Editor opens.
  2. Choose the dataset you want to edit. If it is the dataset that is currently open, you will be given the option to close it and continue.
  3. Click through the screens in the wizard until you reach the Punctuation Rules.
  4. Customize the "middle" rule for the hyphen such that it is null rather than a space.
  5. Click Finish. The dataset will be reprocessed using the punctuation rule.

In the reprocessed dataset, a document that contains both "holdup" and "hold-up" will respond exactly the same to a search for the word holdup, the word hold-up, the phrase "holdup" "hold-up."

By Example

Search by Example lets you find documents similar to a an example you supply, for example, a complete document or part of one. To create a Search By Example:

  1. Click the By Example tab. The Search by Example panel appears. If there were terms in the Search Text box, they will appear in the Search by Example Text box.
  2. Delete the text in the by Example Text box, if necessary, by clicking Clear.
  3. Select the document or documents you want to use an an example.
  4. Open the Document Viewer, and click on the document in the list of document titles, so that the content of the document appears in the content panel.
  5. Find a phrase or section of the document that you think is significant. Highlight the phrase you want to use as your search term, and right-click on it. A right-click menu appears.
  6. From the dropdown menu, choose Search by Example.
  7. The search will run and the results will display on the Search by Example tab in the Search Tool.

    The numbers following refer to those in the image above.
    1. Major terms, highlighted in blue, were used to determine the similarity between documents.
    2. Search Results slider.
    3. Quality of documents selected with the Search Results slider. The plotline shows similarity of documents found to the example text. Notice that the plot line is green from zero to the cut-off (the red vertical line). These documents are selected in the Galaxy, Document Viewer, and elsewhere in IN-SPIRE.
    4. Quantity (Number) of documents selected. The [-] and [+] buttons decrease or increase by one, respectively, the number of documents selected.
    After a search by example runs, only a single document is selected, the very document in the dataset that supplied the phrase on which you based the search.
  8. Move the Search Results slider to the right to select more documents, decreasingly similar to the example text. Note that as the number of documents selected increases, the quality of the match decreases.
  9. Click the Group Results button to create a group from the currently-selected documents.

Time Search

Time Search enables you to search for documents by selecting a date range within a dataset. To run a Time Search:

  1. Click the Time Search tab. The Time Search panel appears.
    Time Search panel
  2. Click on the drop-down arrow on the From: or To: date range boxes to show the calendar for choosing starting and ending dates.
    Calendar for picking dates on the Time Search panel
  3. To select a date, click on a number displayed in the calendar. To select a month or year, click on the forward arrows. Date ranges can also be typed manually (optional) using the following date formats: Nov 22, 2006 or 11/22/2006.
  4. (Optional) Select time (hour and minutes) by highlighting and clicking on the up or down arrows located in the time box under the calendar.
  5. Click Search. The search will run, and the results will be selected.

Notes

Searching Notes enables you to find words and phrases in notes attached to documents. These are notes you or colleagues have created. If a dataset has not been annotated, a search on the notes will yield no results. To search Notes:

  1. Click the Notes tab. The Notes panel appears.
    Search Window - Search in Notes
  2. Enter the word or phrase you want to search for in the Notes.
  3. Select whether you want to Search all documents or Search only selected documents by clicking on the option under the Search Text box.
  4. Click Search. The search will run and the results selected.
  5. (Optional) Click Group Results to create a group of the selected documents.