So, sometimes when you’re performing a general search in The Portal to Texas History, you really don’t want 70,000 hits from newspapers. Here’s how to avoid them.
Although the Portal makes it easy to restrict your search to newspapers, we don’t yet have a native way to restrict your search to everything but newspapers. It’s tempting–but not entirely precise–to handle the problem by eliminating the keyword “newspaper” from your search. Consider the following examples:
Search String Results —————————— —————————————————————————————————- shoes Searching “everything” full-text with the keyword “shoes” yields 78,799 items in the results list.
shoes -newspaper The same search with the keyword “newspaper” eliminated produces 2,361 items.
shoes -newspaper -newspapers Eliminating both “newspaper” and “newspapers” gets it down to 2,172 items. ———————————————————————————————————————————–
Seems logical, but the last two searches will exclude from the results list any items that have the word “newspaper” anywhere in the text or metadata. For example, the photograph “Young Woman in Bathing Suit” will be eliminated because that young woman happens to be looking through a cutout in a newspaper.
A better solution is to tell the search system to eliminate anything that actually is a newspaper. This requires a “URL hack” to remove the newspaper “resource type.” Oddly, the easiest way to do this is to search for newspapers in order to display the appropriate syntax, and then insert a “-“ in the URL between the “=” and “dc_type.” Seem complicated? Here’s an example of how to do it:
- Go to the basic search screen in the Portal.
- Enter the search term “shoes” in the box, click the word
“Newspapers” above the box, and then click the “Submit” button.
- Now look at the URL in your browser’s address bar. You should see
https://texashistory.unt.edu/search/?q=shoes&t=fulltext&fq=dc_type%3Atext_newspaper.
\ - Insert a minus sign (hyphen) in the URL between “=” and “dc_type.”
![URL with minus sign placed before dc_type][] - Press the “Enter” key on on your keyboard to resubmit the search.
- Voila! You now have a results list of 3,934 entries for items that
are not newspapers, but do contain the word “shoes” in their text or
metadata.
You can learn more about searching in The Portal to Texas History by visiting our Basic Search Guide.
–submitted by Nancy Reis, Publications Specialist, Digital Libraries Division