The Query function enables you to search the dataset for specific words, concepts, and phrases. You can use several powerful query techniques, including Word Query, Query by Example (QBE), and Query in Notes.
To open the Query window, perform the following procedure.
Click the Show Query
button on the IN-SPIRE main window toolbar, or from the
Tools menu on the IN-SPIRE main window, select Query.
The Query window will display with the Word Query tab visible. The
main query types display in tabs across the top of the Query window.
Click on a tab to display the related query tool.
Word Query looks for documents that contain combinations of Query Text words. Queries can be constructed using the Boolean operators AND,OR,and NOT. If no Boolean operator is specified, query words are joined with the Boolean AND, resulting in each document in the result set containing all the query words. Word Query finds exact matches only.
Query By Example enables you to find documents having related content rather than exact word matches. To do this, it creates a "mathematical signature" of the Query terms and then looks for documents having a similar signature. The Query Results slider controls the number of hits and how similar the result set documents will be.
Query
Words in Notes enables you to query the notes that may be attached to
documents in your dataset. You
can query on phrases, use wildcard characters such as *, and construct
a proximity query using the ~ character.
All query text is interpreted in a case-insensitive manner, which means capitalization is ignored. This applies to all types of queries, including inside phrases.
A Word Query enables you to search for words in a document. To create a Word Query, perform the following procedure.
If
necessary, click on the Word Query tab. The
Word Query tool will display.
Type a word or words in the Query Text box.
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 Ctrl-click. The terms are combined with the AND operator and all selected fields are searched. The Query button will be enabled.
Select whether you want to Query all documents or Query only selected documents by clicking on the option under the Query Text box.
Click Query. The query will run, with the results being highlighted in the Galaxy.
In addition to steps 1-4, you can use any of the following refining techniques to perform a Word query.
If you pick more than one field, it is important to note that the entire query is run against each of the specified fields separately. Such a query returns documents for which one or more of the selected fields satisfies the query. The query is not applied across the specified fields. For example, suppose you selected the TITLE and AUTHOR fields, and then entered the following query:
Abbott and Costello
This would return documents with both words, Abbot and Costello, in the title, or both words in the author field, or both words in both fields. Note that this query 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 field, taken by itself, satisfies the query. One effect of this rule is that selecting all of the individual fields in the Fields list is not equivalent to selecting All Fields.
Word Query can quantify and provide relevance feedback from Boolean queries, analogous to and consistent with the "closeness” quantity computed for Query by Example (QBE) results. Relevance is made up of the following components:
Independence: The relevance of each document returned by a query is independent of any other document returned by that query.
Coverage: The more query terms found in a document, the higher its relevance.
Balance: An even distribution of query terms found in a document outranks an uneven distribution.
Complexity: The more complex the query, the less coverage required for a document to achieve a given relevance score.
Size: Shorter documents will have higher relevance scores, all other things being equal.
Punctuation rules apply not only to the query expression, but to the content of any document to be searched.
Phrase queries take full advantage of the power and flexibility of the punctuation rules, without sacrificing accuracy.
For example, suppose you want to “de-hyphenate” all hyphenated words, such that “hold-up” maps to “holdup.” You can customize the “middle” rule for the hyphen such that it is null rather than a space. Now, a document that contains both "holdup” and “hold-up” would respond exactly the same to a query for the word holdup, the word hold-up, the phrase "holdup” “hold-up.”
Query by Example enables you to find documents similar to or "close to" a document you have by searching the dataset for documents containing words or phrases similar to an example you supply. To create a Query By Example, perform the following procedure.
Click the By Example tab. The Query by Example panel will display. Text highlighted in blue indicates major terms.
In the Galaxy, select the document or documents you want to use as an example.
Open the Document Viewer.
In the Document Viewer text area, find a phrase you think significant. Highlight the phrase you want to use as your query, and right-click. A drop-down menu will display.
Select Query by Example from the drop-down menu.
The Query will run and the results will display
in the Query by Example tab in the Query window.
The initial results will pinpoint the one document in the dataset that
supplied the phrase on which you based the query.
To see documents that contain words and phrases
similar to the ones you selected as the query, move the Query Results
slider to the right. The
number of documents containing similar words will go up as you move the
slider and the tally is displayed under the Quantity axes of the Query
Results histogram.
The documents will highlight in the Galaxy as you move the slider.
Note that
as the Quantity of documents goes up, the Quality of results will go down.
Click the Group Results button to form a group in the Groups tool of the documents you found with the Query by Example.
View the documents in the new group with the Document Viewer.
Query in Notes enables you to find words and phrases in notes attached to documents. These are notes you or colleagues may have created. If a dataset has not been annotated, a query on the notes will yield no results. To create a Query in Notes, perform the following procedure.
Click the
Notes tab. The
Notes panel will display.
Enter the word or phrase you want to search for in the appended document notes.
Select whether you want to Query all documents or Query only selected documents by clicking on the option under the Query Text box.
Click Query. The query will run, with the results being highlighted in the Galaxy.
Click Group Results to create a group in the Groups tool composed of the documents in your query results.
The Query tool offers a number of tools that enable you to refine your document searches.
To create a group with the results of a query, click the Group Results button. The new group will display as a locked group in the Groups window under the Selection History folder. The new group will have the same name as the query.
Queries are automatically saved in the Query History list as you create them.
You can use an asterisk in a phrase query as a wild card placeholder as a substitute for either characters or words. Use an asterisk between words and followed by a number, to take the place of a number of (unspecified) words. For example:
Query | Example Results |
|
|
Since IN-SPIRE removes punctuation, contractions such as "don't" are seen as 2 words, "don" and "t". Use wildcards such as *2 as described in the above table to find possible contractions.
The Query History panel of the Queries window keeps a list of all the queries you run on the dataset. The Query History will display the type of query and the number of document 'hits' the query yielded.
W indicates a Word query
Q indicates a Query by Example
N indicates a Query within Notes
F indicates a query on a Field such as Title, rather than All Fields.
You can rerun a query at any time by selecting it from the list and clicking the Query button.
You can select a Word query and run it as a Query in Notes or as a Query by Example to yield different views into the dataset.
In the Query History list of queries you have run, click on the query you want to delete.
Click Remove The query will be removed from the Query History list.
If you have a translation engine installed on your system or server, you can use the integrated translation capabilities of IN-SPIRE to formulate bilingual queries. Once you have the translation turned on, perform the following procedure.
Load a foreign language dataset.
Once translation is turned on and you have selected the language you want to translate, click the Query button.
The Translate button in the Query window becomes active.
Enter a Query in the Query Text box. For
this example, we will perform a Word Query on a Spanish language dataset.
To query
the dataset for the word 'horse', we typed the term in the Query Text
field.
Click the Translate button. The
query terms will be translated and will display in both languages.
Click the Query button. The
translated query will be run on the document dataset and the results will
display in the Query History.
Click Group Results to group the documents found by the bilingual query. You can view these documents in both languages in the Document Viewer.
4/24/06